From 1294672809ca2811e294977e63d69c820211644b Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 30 Oct 2021 07:31:12 +0200 Subject: [PATCH] Bugfix search with excluded shelfs --- cps/web.py | 2 +- test/Calibre-Web TestSummary_Linux.html | 744 +++++++++++++++--------- 2 files changed, 462 insertions(+), 284 deletions(-) diff --git a/cps/web.py b/cps/web.py index d1de5677..8d5d2adf 100644 --- a/cps/web.py +++ b/cps/web.py @@ -1186,7 +1186,7 @@ def adv_search_serie(q, include_series_inputs, exclude_series_inputs): def adv_search_shelf(q, include_shelf_inputs, exclude_shelf_inputs): q = q.outerjoin(ub.BookShelf, db.Books.id == ub.BookShelf.book_id)\ - .filter(or_(ub.BookShelf.shelf is None, ub.BookShelf.shelf.notin_(exclude_shelf_inputs))) + .filter(or_(ub.BookShelf.shelf == None, ub.BookShelf.shelf.notin_(exclude_shelf_inputs))) if len(include_shelf_inputs) > 0: q = q.filter(ub.BookShelf.shelf.in_(include_shelf_inputs)) return q diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index 069b8146..7cdaa5a0 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
-

Start Time: 2021-10-12 06:15:04

+

Start Time: 2021-10-29 07:17:17

-

Stop Time: 2021-10-12 09:37:09

+

Stop Time: 2021-10-29 10:46:29

-

Duration: 2h 43 min

+

Duration: 2h 49 min

@@ -378,11 +378,11 @@ - + TestDeleteDatabase 1 - 1 0 + 1 0 0 @@ -392,11 +392,32 @@ - +
TestDeleteDatabase - test_delete_books_in_database
- PASS + +
+ FAIL +
+ + + + @@ -696,13 +717,13 @@ - + TestEditAdditionalBooks 16 14 - 1 0 - 1 + 0 + 2 Detail @@ -844,31 +865,11 @@ - +
TestEditAdditionalBooks - test_xss_author_edit
- -
- FAIL -
- - - - + SKIP @@ -1239,11 +1240,11 @@ AssertionError: 200 != 400 - + TestEditBooksList 10 - 10 - 0 + 9 + 1 0 0 @@ -1316,11 +1317,31 @@ AssertionError: 200 != 400 - +
TestEditBooksList - test_list_visibility
- PASS + +
+ FAIL +
+ + + + @@ -1344,11 +1365,11 @@ AssertionError: 200 != 400 - + TestEditBooksOnGdrive 20 - 20 - 0 + 19 + 1 0 0 @@ -1529,11 +1550,31 @@ AssertionError: 200 != 400 - +
TestEditBooksOnGdrive - test_watch_metadata
- PASS + +
+ FAIL +
+ + + + @@ -1902,6 +1943,117 @@ AssertionError: 200 != 400 + + TestKoboSyncBig + 4 + 1 + 1 + 2 + 0 + + Detail + + + + + + + +
TestKoboSyncBig - test_kobo_sync_selected_shelfs
+ + +
+ ERROR +
+ + + + + + + + + + +
TestKoboSyncBig - test_sync_changed_book
+ + +
+ ERROR +
+ + + + + + + + + + +
TestKoboSyncBig - test_sync_reading_state
+ + PASS + + + + + + +
TestKoboSyncBig - test_sync_shelf
+ + +
+ FAIL +
+ + + + + + + + + TestLdapLogin 13 @@ -1910,13 +2062,13 @@ AssertionError: 200 != 400 0 0 - Detail + Detail - +
TestLdapLogin - test_LDAP_SSL
@@ -1925,7 +2077,7 @@ AssertionError: 200 != 400 - +
TestLdapLogin - test_LDAP_SSL_CERTIFICATE
@@ -1934,7 +2086,7 @@ AssertionError: 200 != 400 - +
TestLdapLogin - test_LDAP_STARTTLS
@@ -1943,7 +2095,7 @@ AssertionError: 200 != 400 - +
TestLdapLogin - test_LDAP_fallback_Login
@@ -1952,7 +2104,7 @@ AssertionError: 200 != 400 - +
TestLdapLogin - test_LDAP_import
@@ -1961,7 +2113,7 @@ AssertionError: 200 != 400 - +
TestLdapLogin - test_LDAP_import_memberfield
@@ -1970,7 +2122,7 @@ AssertionError: 200 != 400 - +
TestLdapLogin - test_LDAP_login
@@ -1979,7 +2131,7 @@ AssertionError: 200 != 400 - +
TestLdapLogin - test_invalid_LDAP
@@ -1988,7 +2140,7 @@ AssertionError: 200 != 400 - +
TestLdapLogin - test_ldap_about
@@ -1997,7 +2149,7 @@ AssertionError: 200 != 400 - +
TestLdapLogin - test_ldap_authentication
@@ -2006,7 +2158,7 @@ AssertionError: 200 != 400 - +
TestLdapLogin - test_ldap_kobo_sync
@@ -2015,7 +2167,7 @@ AssertionError: 200 != 400 - +
TestLdapLogin - test_ldap_opds_anonymous
@@ -2024,7 +2176,7 @@ AssertionError: 200 != 400 - +
TestLdapLogin - test_ldap_opds_download_book
@@ -2042,13 +2194,13 @@ AssertionError: 200 != 400 0 1 - Detail + Detail - +
TestLogging - test_access_log_recover
@@ -2057,7 +2209,7 @@ AssertionError: 200 != 400 - +
TestLogging - test_debug_log
@@ -2066,7 +2218,7 @@ AssertionError: 200 != 400 - +
TestLogging - test_debuginfo_download
@@ -2075,7 +2227,7 @@ AssertionError: 200 != 400 - +
TestLogging - test_failed_login
@@ -2084,19 +2236,19 @@ AssertionError: 200 != 400 - +
TestLogging - test_failed_register
- SKIP + SKIP
-