diff --git a/cps/render_template.py b/cps/render_template.py index fb0b5067..16fdab13 100644 --- a/cps/render_template.py +++ b/cps/render_template.py @@ -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 [] diff --git a/cps/web.py b/cps/web.py index 6d993e29..8a52f97a 100644 --- a/cps/web.py +++ b/cps/web.py @@ -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: diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index dde602ab..a2fbfe1a 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
-

Start Time: 2020-12-12 12:19:43

+

Start Time: 2021-01-01 20:50:20

-

Stop Time: 2020-12-12 14:23:09

+

Stop Time: 2021-01-02 02:07:39

-

Duration: 1h 33 min

+

Duration: 4h 51 min

@@ -234,44 +234,82 @@ - - _ErrorHolder - 29 + + TestCli + 8 + 7 0 0 - 29 - 0 + 1 - Detail + Detail - + -
tearDownClass (test_anonymous)
+
TestCli - test_already_started
+ + PASS + + + + + + +
TestCli - test_bind_to_single_interface
+ + PASS + + + + + + +
TestCli - test_cli_SSL_files
+ + PASS + + + + + + +
TestCli - test_cli_different_folder
+ + PASS + + + + + + +
TestCli - test_cli_different_settings_database
+ + PASS + + + + + + +
TestCli - test_cli_gdrive_location
- ERROR + SKIP
-