1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-06-26 07:03:17 +00:00

Update web.py

Set db.Publishers query to order by name column, because publishers.sort column is empty.
This commit is contained in:
Knepherbird 2020-05-07 13:55:59 -07:00 committed by GitHub
parent 6a6c1b6b21
commit 69fde7dead
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()