Better error handling on order parameter for sorting of user and books table

This commit is contained in:
Ozzie Isaacs
2026-04-06 15:12:09 +02:00
parent 7c715f34dc
commit 0ed4d81da2
2 changed files with 4 additions and 2 deletions

View File

@@ -842,7 +842,8 @@ def list_books():
order = request.args.get("order", "").lower()
state = None
join = tuple()
if not order in ["asc", "desc", ""]:
order = "asc"
if sort_param == "state":
state = json.loads(request.args.get("state", "[]"))
elif sort_param == "tags":