Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Commit

Permalink
Don't add the geometry to sources loads
Browse files Browse the repository at this point in the history
  • Loading branch information
CannonLock committed Feb 15, 2024
1 parent fbbf505 commit bfa7043
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ async def get_source(source_id: int, include_geom: bool = False) -> Sources:
async with async_session() as session:

select_stmt = select(
*[c for c in schemas.Sources.__table__.c if c.name not in ['rgeom', 'web_geom']],
func.ST_AsGeoJSON(schemas.Sources.rgeom).label("geometry"),
*[c for c in schemas.Sources.__table__.c if c.name not in ['rgeom', 'web_geom']]
).where(schemas.Sources.source_id == source_id)

results = await session.execute(select_stmt)
Expand Down

0 comments on commit bfa7043

Please sign in to comment.