summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorubq323 <ubq323>2021-07-18 14:51:55 +0000
committerubq323 <ubq323>2021-07-18 14:51:55 +0000
commit2d92be0e223a8b54749d0b2d304a78b16b92000d (patch)
tree75cabfbac369d14bc697c2c7e71fbf2ce63126f9
parent2a0a21ae101ce54080bdedd323a6ca6ddf36d35f (diff)
shouldn't count retractions as part of the total vote countpolls
-rw-r--r--apioforum/db.py2
1 files changed, 1 insertions, 1 deletions
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;
""",
]