Fix progress bar total

This commit is contained in:
rubenwardy 2019-03-29 20:02:08 +00:00
parent 885209a614
commit 896a65fd99
1 changed files with 4 additions and 1 deletions

View File

@ -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)