diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-11-16 20:04:31 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-11-16 20:04:31 +0100 |
commit | 0eca93c576e26e2abe6a1f347b5b1630e8776123 (patch) | |
tree | a0b7de59a470f3d5d8fcdcabab1a8e309849efc4 /chimere/views.py | |
parent | be7a35065f090c2f5c51eddbb6b3c6817cd9945c (diff) | |
download | Chimère-0eca93c576e26e2abe6a1f347b5b1630e8776123.tar.bz2 Chimère-0eca93c576e26e2abe6a1f347b5b1630e8776123.zip |
Manage inconsistent data
Diffstat (limited to 'chimere/views.py')
-rw-r--r-- | chimere/views.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chimere/views.py b/chimere/views.py index 594f8a8..572aef3 100644 --- a/chimere/views.py +++ b/chimere/views.py @@ -791,13 +791,15 @@ def getGeoObjects(request, area_name, category_ids, status): bounding_box = [] for attr in ['min_lon', 'min_lat', 'max_lon', 'max_lat']: value = request.GET.get(attr, None) - if not value: + if not value or value == 'NaN': bounding_box = None break bounding_box.append(value) if bounding_box: bounding_box = GEOSPolygon.from_bbox(bounding_box) zoom_level = request.GET.get('zoom_level', None) + if zoom_level == '0': + zoom_level = None jsons, zoom_need_reload = _getGeoObjects( area_name, category_ids, status, bounding_box=bounding_box, |