filter duplicates
This commit is contained in:
parent
6f09ad5af5
commit
fee64cb038
|
@ -74,6 +74,7 @@ class ImioLiegeLisrue(BaseResource):
|
|||
lisrues = []
|
||||
|
||||
streets = []
|
||||
known_street_labels = {}
|
||||
for item in lisrues:
|
||||
if item.get('rue'):
|
||||
street_label = item.get('rue')
|
||||
|
@ -83,6 +84,9 @@ class ImioLiegeLisrue(BaseResource):
|
|||
item.get('libelleMinuscule'))
|
||||
else:
|
||||
continue
|
||||
if street_label in known_street_labels:
|
||||
continue
|
||||
known_street_labels[street_label] = True
|
||||
streets.append({
|
||||
'id': item.get('codeRue'),
|
||||
'text': street_label.strip(),
|
||||
|
|
Loading…
Reference in New Issue