Catch additional error on not existing custom column linked to read column (#2341)

Prevent metadata changes are lost on edit books with errors (#2326)
Better log output
Renamed log message on database delete
This commit is contained in:
Ozzie Isaacs
2022-03-20 11:55:12 +01:00
parent 39459603d4
commit 8cb5989c97
10 changed files with 312 additions and 241 deletions
+2 -2
View File
@@ -110,8 +110,8 @@ def get_readbooks_ids():
readBooks = calibre_db.session.query(db.cc_classes[config.config_read_column])\
.filter(db.cc_classes[config.config_read_column].value == True).all()
return frozenset([x.book for x in readBooks])
except (KeyError, AttributeError):
log.error("Custom Column No.%d is not existing in calibre database", config.config_read_column)
except (KeyError, AttributeError, IndexError):
log.error("Custom Column No.{} is not existing in calibre database".format(config.config_read_column))
return []
# Returns the template for rendering and includes the instance name