Skip to content
Snippets Groups Projects
Commit 76ef4a3d authored by Benjamin - Le Filament's avatar Benjamin - Le Filament
Browse files

[fix] erreur si no result

parent 76a37820
No related branches found
No related tags found
No related merge requests found
......@@ -26,8 +26,11 @@ def geo_find(addr):
except Exception as e:
raise UserError(_('Cannot contact geolocation servers. Please make sure that your Internet connection is up and running (%s).') % e)
if len(result) > 0:
geo = result[0]
return float(geo['lat']), float(geo['lon'])
else:
return (0.0, 0.0)
def geo_query_address(street=None, zip=None, city=None,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment