From 748286f60e740042dbe9eb52ef517452a1af5778 Mon Sep 17 00:00:00 2001 From: Emillio Mariscal Date: Wed, 21 Feb 2024 20:29:20 -0300 Subject: [PATCH] Fix for stats query --- python/dbapi/api/stats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/dbapi/api/stats.py b/python/dbapi/api/stats.py index d8b88a84..8338f2d7 100644 --- a/python/dbapi/api/stats.py +++ b/python/dbapi/api/stats.py @@ -49,7 +49,7 @@ async def getCount( count_validated_features as ( \ select count(distinct(all_features.osm_id)) as count from all_features \ left join validation v on all_features.osm_id = v.osm_id \ - where v.status = 'badgeom' \ + where v.status = '{6}' \ ), count_features as (\ select count(distinct(all_features.osm_id)) as total from all_features \ ) \ @@ -60,7 +60,7 @@ async def getCount( "AND ST_Intersects(\"geom\", ST_GeomFromText('MULTIPOLYGON((({0})))', 4326) )".format(area) if area else "", "AND (" + tagsQueryFilter(tags, table) + ")" if tags else "", "AND " + hashtagQueryFilter(hashtag, table) if hashtag else "", - "AND status = '" + status + "'" if status else "", + status ) else: query = "select count(distinct {0}.osm_id) as count from {0} \