Commit d9d12d10 authored by Serge S. Koval's avatar Serge S. Koval

Merge pull request #1294 from ei-grad/fix-geoa-query

contrib.geoa: don't depend on flask-sqlalchemy
parents 44438d87 314505cf
......@@ -17,7 +17,7 @@ def geom_formatter(view, value):
})
if value.srid is -1:
value.srid = 4326
geojson = view.model.query.with_entities(func.ST_AsGeoJSON(value)).scalar()
geojson = view.session.query(view.model).with_entities(func.ST_AsGeoJSON(value)).scalar()
return Markup('<textarea %s>%s</textarea>' % (params, geojson))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment