Fixes from testrun
This commit is contained in:
parent
b100d198e8
commit
9b50114852
|
@ -104,7 +104,7 @@ def get_readbooks_ids():
|
||||||
readBooks = calibre_db.session.query(db.cc_classes[config.config_read_column])\
|
readBooks = calibre_db.session.query(db.cc_classes[config.config_read_column])\
|
||||||
.filter(db.cc_classes[config.config_read_column].value == True).all()
|
.filter(db.cc_classes[config.config_read_column].value == True).all()
|
||||||
return frozenset([x.book for x in readBooks])
|
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)
|
log.error("Custom Column No.%d is not existing in calibre database", config.config_read_column)
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
|
|
@ -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),
|
db_filter = and_(ub.ReadBook.user_id == int(current_user.id),
|
||||||
ub.ReadBook.read_status == ub.ReadBook.STATUS_FINISHED)
|
ub.ReadBook.read_status == ub.ReadBook.STATUS_FINISHED)
|
||||||
else:
|
else:
|
||||||
db_filter = and_(ub.ReadBook.user_id == int(current_user.id),
|
db_filter = coalesce(ub.ReadBook.read_status, 0) != ub.ReadBook.STATUS_FINISHED
|
||||||
coalesce(ub.ReadBook.read_status, 0) != ub.ReadBook.STATUS_FINISHED)
|
|
||||||
entries, random, pagination = calibre_db.fill_indexpage(page, 0,
|
entries, random, pagination = calibre_db.fill_indexpage(page, 0,
|
||||||
db.Books,
|
db.Books,
|
||||||
db_filter,
|
db_filter,
|
||||||
order,
|
order,
|
||||||
ub.ReadBook, db.Books.id==ub.ReadBook.book_id)
|
ub.ReadBook, db.Books.id == ub.ReadBook.book_id)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
if are_read:
|
if are_read:
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user