Fixes from testrun

This commit is contained in:
OzzieIsaacs 2021-01-02 07:51:48 +01:00
parent b100d198e8
commit 9b50114852
3 changed files with 1188 additions and 7882 deletions

View File

@ -104,7 +104,7 @@ 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:
except (KeyError, AttributeError):
log.error("Custom Column No.%d is not existing in calibre database", config.config_read_column)
return []

View File

@ -616,13 +616,12 @@ def render_read_books(page, are_read, as_xml=False, order=None):
db_filter = and_(ub.ReadBook.user_id == int(current_user.id),
ub.ReadBook.read_status == ub.ReadBook.STATUS_FINISHED)
else:
db_filter = and_(ub.ReadBook.user_id == int(current_user.id),
coalesce(ub.ReadBook.read_status, 0) != ub.ReadBook.STATUS_FINISHED)
db_filter = coalesce(ub.ReadBook.read_status, 0) != ub.ReadBook.STATUS_FINISHED
entries, random, pagination = calibre_db.fill_indexpage(page, 0,
db.Books,
db_filter,
order,
ub.ReadBook, db.Books.id==ub.ReadBook.book_id)
ub.ReadBook, db.Books.id == ub.ReadBook.book_id)
else:
try:
if are_read:

File diff suppressed because it is too large Load Diff