0001-grandlyon-street-sections-skip-invalid-data-50479.patch
passerelle/contrib/grandlyon_streetsections/models.py | ||
---|---|---|
125 | 125 |
sections = self.requests.get( |
126 | 126 |
'https://download.data.grandlyon.com/ws/grandlyon/adr_voie_lieu.adraxevoie/all.json?maxfeatures=1000000').content |
127 | 127 |
for value in json_loads(sections).get('values'): |
128 |
if not value.get('codefuv') or not value.get('codetroncon'): |
|
129 |
continue |
|
128 | 130 |
section, created = StreetSection.objects.get_or_create( |
129 | 131 |
codefuv=value.get('codefuv'), |
130 | 132 |
codetroncon=value.get('codetroncon')) |
131 |
- |