From 854a7d020dfe5713b8a48356ba53a58600af3296 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Fri, 28 Mar 2025 17:23:45 +0100 Subject: [PATCH] Better error output for "empty" Author sort not working Update bleach requirement --- cps/db.py | 3 ++- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cps/db.py b/cps/db.py index 38b3f07f..9840643c 100644 --- a/cps/db.py +++ b/cps/db.py @@ -901,7 +901,8 @@ class CalibreDB: results = self.session.query(Authors).filter(Authors.sort == auth).all() # ToDo: How to handle not found author name if not len(results): - log.error("Author {} not found to display name in right order".format(auth)) + book_id = entry.id if isinstance(entry, Books) else entry[0].id + log.error("Author '{}' of book {} not found to display name in right order".format(auth, book_id)) # error = True break for r in results: diff --git a/requirements.txt b/requirements.txt index 15d6ff2e..e6ee645a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,7 +19,7 @@ netifaces-plus>=0.12.0,<0.13.0 urllib3>=1.22,<3.0 Flask-Limiter>=2.3.0,<3.13.0 regex>=2022.3.2,<2025.3.20 -bleach>=6.0.0,<6.2.0 +bleach>=6.0.0,<6.3.0 python-magic>=0.4.27,<0.5.0 python-magic-bin>=0.4.0,<0.5.0;sys_platform=='win32' flask-httpAuth>=4.4.0,<5.0.0