@@ -112,12 +112,8 @@ def __init__(
112112 )
113113 )
114114 self .srid_l_areas = DB .session .scalar (
115- select (
116- func .Find_SRID (
117- LAreas .__table__ .schema , LAreas .__table__ .name , "geom"
118- )
119- )
120- )
115+ select (func .Find_SRID (LAreas .__table__ .schema , LAreas .__table__ .name , "geom" ))
116+ )
121117
122118 def add_join (self , right_table , right_column , left_column , join_type = "right" ):
123119 if self .first :
@@ -451,7 +447,7 @@ def filter_other_filters(self, user):
451447 else :
452448 raise BadRequest ("Unsupported geoIntersection type" )
453449 geo_filters = []
454-
450+
455451 for feature in features :
456452 geom_wkb = from_shape (shape (feature ["geometry" ]), srid = 4326 )
457453 geometry = func .ST_GeomFromWKB (geom_wkb )
@@ -465,8 +461,12 @@ def filter_other_filters(self, user):
465461 if "radius" in feature ["properties" ]:
466462 radius = feature ["properties" ]["radius" ]
467463 geo_filter = func .ST_DWithin (
468- sa .cast (self .geom_column ,Geography ) if isinstance (self .geom_column .type , Geometry ) else self .geom_column ,
469- sa .cast (geometry ,Geography ),
464+ (
465+ sa .cast (self .geom_column , Geography )
466+ if isinstance (self .geom_column .type , Geometry )
467+ else self .geom_column
468+ ),
469+ sa .cast (geometry , Geography ),
470470 radius ,
471471 )
472472 else :
@@ -504,7 +504,7 @@ def filter_other_filters(self, user):
504504 if self .geom_column .class_ != self .model :
505505 l_areas_cte = LAreas .query .filter (LAreas .id_area .in_ (value )).cte ("area_filter" )
506506 if self .srid != 4326 :
507-
507+
508508 if self .srid != self .srid_l_areas :
509509 self .query = self .query .where (
510510 func .ST_Intersects (
0 commit comments