From 69fde7deadd22f1d69b7794a4ecdfcc2d446017d Mon Sep 17 00:00:00 2001 From: Knepherbird Date: Thu, 7 May 2020 13:55:59 -0700 Subject: [PATCH] Update web.py Set db.Publishers query to order by name column, because publishers.sort column is empty. --- cps/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/web.py b/cps/web.py index 2b87099c..d2e18aaa 100644 --- a/cps/web.py +++ b/cps/web.py @@ -801,7 +801,7 @@ def publisher_list(): if current_user.check_visibility(constants.SIDEBAR_PUBLISHER): entries = db.session.query(db.Publishers, func.count('books_publishers_link.book').label('count')) \ .join(db.books_publishers_link).join(db.Books).filter(common_filters()) \ - .group_by(text('books_publishers_link.publisher')).order_by(db.Publishers.sort).all() + .group_by(text('books_publishers_link.publisher')).order_by(db.Publishers.name).all() charlist = db.session.query(func.upper(func.substr(db.Publishers.name, 1, 1)).label('char')) \ .join(db.books_publishers_link).join(db.Books).filter(common_filters()) \ .group_by(func.upper(func.substr(db.Publishers.name, 1, 1))).all()