Skip to content
This repository has been archived by the owner on Oct 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #468 from hotosm/fix/stats
Browse files Browse the repository at this point in the history
Fix for stats query
  • Loading branch information
emi420 authored Feb 21, 2024
2 parents 46ac118 + 748286f commit bda916e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/dbapi/api/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
) \
Expand All @@ -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} \
Expand Down

0 comments on commit bda916e

Please sign in to comment.