restore page count to topics view

This commit is contained in:
2026-04-20 13:22:41 +03:00
parent b9c4ec3911
commit 65ad672748

View File

@@ -16,7 +16,7 @@ def topic(slug):
if not topic:
abort(404)
sort_by = request.args.get('sort_by', default=session.get('sort_by', default='activity'))
PER_PAGE = 3
PER_PAGE = 10
threads_count = Threads.count({'topic_id': topic.id})
page_count = max(1, math.ceil(threads_count / PER_PAGE))
try: