grandlyon street sections: support data returning null values (#45042)
gitea-wip/passerelle/pipeline/head There was a failure building this commit Details
gitea/passerelle/pipeline/head Something is wrong with the build of this commit Details

This commit is contained in:
Frédéric Péters 2020-07-11 12:53:20 +02:00
parent 2056330836
commit 1fbb858798
1 changed files with 2 additions and 1 deletions

View File

@ -117,7 +117,8 @@ class GrandLyonStreetSections(BaseResource):
for attribute in ('bornemindroite', 'bornemingauche',
'bornemaxdroite', 'bornemaxgauche',
'gid'):
if value.get(attribute) == 'None':
if value.get(attribute) in (None, 'None'):
# data.grandlyon returned 'None' as a string at a time
if 'min' in attribute:
attribute_value = 0
elif 'max' in attribute: