aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2019-03-29 20:02:08 +0000
committerrubenwardy <rw@rubenwardy.com>2019-03-29 20:02:10 +0000
commit896a65fd99007a03f45a02c6e6ebb61a9932898c (patch)
treec98d984ff2442033f5bfe0b79f001b7e8662cdff
parent885209a6146b7f6d2a0e62a1351791973f2e6677 (diff)
downloadcheatdb-896a65fd99007a03f45a02c6e6ebb61a9932898c.tar.xz
Fix progress bar total
-rw-r--r--app/views/admin/todo.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/admin/todo.py b/app/views/admin/todo.py
index cd0461b..88b3cd7 100644
--- a/app/views/admin/todo.py
+++ b/app/views/admin/todo.py
@@ -60,7 +60,10 @@ def todo_topics_page():
qb.setSortIfNone("date")
query = qb.buildTopicQuery()
- total = ForumTopic.query.count()
+ tmp_q = ForumTopic.query
+ if not qb.show_discarded:
+ tmp_q = tmp_q.filter_by(discarded=qb.show_discarded)
+ total = tmp_q.count()
topic_count = query.count()
page = int(request.args.get("page") or 1)