From 81dbb18ef4eb612aab5bfc856dbfa3cf24e337c7 Mon Sep 17 00:00:00 2001 From: Christian Quest Date: Fri, 6 May 2016 18:06:08 +0200 Subject: [PATCH] has_key > in --- backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend.py b/backend.py index c814107..465970e 100644 --- a/backend.py +++ b/backend.py @@ -55,7 +55,7 @@ class EventResource(object): db = db_connect() cur = db.cursor() if id is None: - if req.params.has_key('bbox'): + if 'bbox' in req.params: bbox = req.params['bbox'] cur.execute(""" SELECT '{"type":"Feature", "properties": '|| (events_tags::jsonb || jsonb_build_object('id',events_id,'createdate',createdate,'lastupdate',lastupdate))::text ||', "geometry":'|| st_asgeojson(st_centroid(geom)) ||' }' as feature