From 2d92be0e223a8b54749d0b2d304a78b16b92000d Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sun, 18 Jul 2021 14:51:55 +0000 Subject: shouldn't count retractions as part of the total vote count --- apioforum/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apioforum/db.py b/apioforum/db.py index ba1f6a3..f3693a9 100644 --- a/apioforum/db.py +++ b/apioforum/db.py @@ -117,7 +117,7 @@ CREATE VIEW vote_counts AS """, """ CREATE VIEW total_vote_counts AS - SELECT poll, count(*) AS total_votes FROM votes WHERE current GROUP BY poll; + SELECT poll, count(*) AS total_votes FROM votes WHERE current AND NOT is_retraction GROUP BY poll; """, ] -- cgit v1.2.3