From a3013c6224e91dbc6d836a6b4f660fdbefe6663f Mon Sep 17 00:00:00 2001 From: Zach Flanders Date: Tue, 25 Apr 2023 00:20:54 -0500 Subject: [PATCH] updating list view --- bookwyrm/views/list/list.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bookwyrm/views/list/list.py b/bookwyrm/views/list/list.py index 30d6f970a..660bd1a62 100644 --- a/bookwyrm/views/list/list.py +++ b/bookwyrm/views/list/list.py @@ -129,7 +129,7 @@ def sort_list(request, items): """helper to handle the surprisingly involved sorting""" # sort_by shall be "order" unless a valid alternative is given sort_by = request.GET.get("sort_by", "order") - if sort_by not in ("order", "title", "rating"): + if sort_by not in ("order", "sort_title", "rating"): sort_by = "order" # direction shall be "ascending" unless a valid alternative is given @@ -139,7 +139,7 @@ def sort_list(request, items): directional_sort_by = { "order": "order", - "title": "book__title", + "sort_title": "book__sort_title", "rating": "average_rating", }[sort_by] if direction == "descending":