has_key > in
This commit is contained in:
parent
2818e28708
commit
81dbb18ef4
1 changed files with 1 additions and 1 deletions
|
|
@ -55,7 +55,7 @@ class EventResource(object):
|
||||||
db = db_connect()
|
db = db_connect()
|
||||||
cur = db.cursor()
|
cur = db.cursor()
|
||||||
if id is None:
|
if id is None:
|
||||||
if req.params.has_key('bbox'):
|
if 'bbox' in req.params:
|
||||||
bbox = req.params['bbox']
|
bbox = req.params['bbox']
|
||||||
cur.execute("""
|
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
|
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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue