Commit 314505cf authored by Andrew Grigorev's avatar Andrew Grigorev

contrib.geoa: don't depend on flask-sqlalchemy

parent 44438d87
...@@ -17,7 +17,7 @@ def geom_formatter(view, value): ...@@ -17,7 +17,7 @@ def geom_formatter(view, value):
}) })
if value.srid is -1: if value.srid is -1:
value.srid = 4326 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)) 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