diff --git a/backend.py b/backend.py index 69575c8..5528493 100644 --- a/backend.py +++ b/backend.py @@ -59,10 +59,10 @@ class EventResource(object): if 'bbox' in req.params: # limit search with bbox (E,S,W,N) - event_bbox = str(cur.mogrify(" AND geom && ST_SetSRID(ST_MakeBox2D(ST_Point(%s,%s),ST_Point(%s,%s)),4326) ",tuple(req.params['bbox']))).decode("utf-8") + event_bbox = cur.mogrify(" AND geom && ST_SetSRID(ST_MakeBox2D(ST_Point(%s,%s),ST_Point(%s,%s)),4326) ",tuple(req.params['bbox'])).decode("utf-8") elif 'near' in req.params: # limit search with location+distance (long, lat, distance in meters) - event_bbox = str(cur.mogrify(" AND geom && st_expand(st_buffer(st_setsrid(st_makepoint(%s,%s),4326)::geography,%s)::geometry,0) ",tuple(req.params['near']))).decode("utf-8") + event_bbox = cur.mogrify(" AND geom && st_expand(st_buffer(st_setsrid(st_makepoint(%s,%s),4326)::geography,%s)::geometry,0) ",tuple(req.params['near'])).decode("utf-8") else: event_bbox = ""