1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-10-25 20:37:41 +00:00

Bugfix sort books list and user list

Prevent transferring password hash to client
This commit is contained in:
Ozzie Isaacs
2021-04-08 19:37:08 +02:00
parent 7561eabe52
commit 2d73f541c0
7 changed files with 29 additions and 17 deletions

View File

@@ -755,11 +755,12 @@ def books_table():
def list_books():
off = request.args.get("offset") or 0
limit = request.args.get("limit") or config.config_books_per_page
# sort = request.args.get("sort")
if request.args.get("order") == 'desc':
order = [db.Books.timestamp.desc()]
sort = request.args.get("sort")
order = request.args.get("order")
if sort and order:
order = [text(sort + " " + order)]
else:
order = [db.Books.timestamp.asc()]
order = [db.Books.timestamp.desc()]
search = request.args.get("search")
total_count = calibre_db.session.query(db.Books).count()
if search: