From 8e134a7c858f1d2240ae785130cdb3e1ba0650a6 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 2 Jun 2018 19:44:57 +0100 Subject: [PATCH] Fix todo topics sort order --- app/views/packages/todo.py | 2 +- app/views/users.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/packages/todo.py b/app/views/packages/todo.py index d4526ee2..81735ebe 100644 --- a/app/views/packages/todo.py +++ b/app/views/packages/todo.py @@ -58,7 +58,7 @@ def todo_topics_page(): topics = KrockForumTopic.query \ .filter(~ db.exists().where(Package.forums==KrockForumTopic.topic_id)) \ - .order_by(db.asc(KrockForumTopic.title)) \ + .order_by(db.asc(KrockForumTopic.name), db.asc(KrockForumTopic.title)) \ .all() return render_template("todo/topics.html", topics=topics, total=total) diff --git a/app/views/users.py b/app/views/users.py index 51efd1d8..6dc14058 100644 --- a/app/views/users.py +++ b/app/views/users.py @@ -101,7 +101,7 @@ def user_profile_page(username): topics_to_add = KrockForumTopic.query \ .filter_by(author_id=user.id) \ .filter(~ db.exists().where(Package.forums==KrockForumTopic.topic_id)) \ - .order_by(db.asc(KrockForumTopic.title)) \ + .order_by(db.asc(KrockForumTopic.name), db.asc(KrockForumTopic.title)) \ .all() # Process GET or invalid POST