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)