From b46d3b255421496aa1301f263db556bc9307a47b Mon Sep 17 00:00:00 2001 From: Samriti Sadhu Date: Tue, 17 Sep 2024 16:22:32 +0100 Subject: [PATCH] test fix --- application/data_access/entity_queries.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/application/data_access/entity_queries.py b/application/data_access/entity_queries.py index bad2e9ab..75ad1ea1 100644 --- a/application/data_access/entity_queries.py +++ b/application/data_access/entity_queries.py @@ -177,23 +177,17 @@ def _apply_location_filters(session, query, params): clauses = [] for geometry in params.get("geometry", []): - simplified_geom = func.ST_Envelope(func.ST_GeomFromText(geometry, 4326)) + simplified_geom = func.ST_GeomFromText(geometry, 4326) clauses.append( or_( and_( EntityOrm.geometry.is_not(None), geometry_is_valid, - EntityOrm.geometry.op("&&")( - simplified_geom - ), # Using && operator to trigger index spatial_function(EntityOrm.geometry, simplified_geom), ), and_( EntityOrm.point.is_not(None), point_is_valid, - EntityOrm.point.op("&&")( - simplified_geom - ), # Using && operator to trigger index spatial_function(EntityOrm.point, simplified_geom), ), )