diff options
author | rubenwardy <rw@rubenwardy.com> | 2019-03-29 20:02:08 +0000 |
---|---|---|
committer | rubenwardy <rw@rubenwardy.com> | 2019-03-29 20:02:10 +0000 |
commit | 896a65fd99007a03f45a02c6e6ebb61a9932898c (patch) | |
tree | c98d984ff2442033f5bfe0b79f001b7e8662cdff | |
parent | 885209a6146b7f6d2a0e62a1351791973f2e6677 (diff) | |
download | cheatdb-896a65fd99007a03f45a02c6e6ebb61a9932898c.tar.xz |
Fix progress bar total
-rw-r--r-- | app/views/admin/todo.py | 5 |
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) |