diff --git a/cps/opds.py b/cps/opds.py index 3085b7de..cd83709a 100644 --- a/cps/opds.py +++ b/cps/opds.py @@ -344,12 +344,12 @@ def feed_shelf(book_id): off = request.args.get("offset") or 0 if current_user.is_anonymous: shelf = ub.session.query(ub.Shelf).filter(ub.Shelf.is_public == 1, - ub.Shelf.id == book_id, not ub.Shelf.deleted).first() + ub.Shelf.id == book_id).first() else: shelf = ub.session.query(ub.Shelf).filter(or_(and_(ub.Shelf.user_id == int(current_user.id), ub.Shelf.id == book_id), and_(ub.Shelf.is_public == 1, - ub.Shelf.id == book_id)), not ub.Shelf.deleted).first() + ub.Shelf.id == book_id))).first() result = list() # user is allowed to access shelf if shelf: diff --git a/cps/web.py b/cps/web.py index 5a90ae34..e4f75cc7 100644 --- a/cps/web.py +++ b/cps/web.py @@ -112,11 +112,12 @@ for ex in default_exceptions: app.register_error_handler(ex, internal_error) -# Only way of catching the LDAPException upon logging in with LDAP server down -@app.errorhandler(services.ldap.LDAPException) -def handle_exception(e): - log.debug('LDAP server not accessible while trying to login to opds feed') - return error_http(FailedDependency()) +if feature_support['ldap']: + # Only way of catching the LDAPException upon logging in with LDAP server down + @app.errorhandler(services.ldap.LDAPException) + def handle_exception(e): + log.debug('LDAP server not accessible while trying to login to opds feed') + return error_http(FailedDependency()) web = Blueprint('web', __name__) diff --git a/test/Calibre-Web TestSummary.html b/test/Calibre-Web TestSummary.html index b39857b4..67599b8a 100755 --- a/test/Calibre-Web TestSummary.html +++ b/test/Calibre-Web TestSummary.html @@ -36,17 +36,17 @@
-

Start Time: 2020-04-18 10:46:25

+

Start Time: 2020-04-25 21:22:13

-

Stop Time: 2020-04-18 11:34:54

+

Stop Time: 2020-04-25 22:12:24

-

Duration: 41:54 min

+

Duration: 42:25 min

@@ -975,51 +975,19 @@ test_kobo_sync.test_kobo_sync - 3 - 2 - 1 + 8 + 8 + 0 0 0 - Detail + Detail - - -
test_check_sync
- - -
- FAIL -
- - - - - - - - - +
test_kobo_about
@@ -1028,7 +996,25 @@ AssertionError: 'http[35 chars]65c2703d57c660b93b6ebdafa/{ImageId}/image.jpg' != + + +
test_shelves_add_remove_books
+ + PASS + + + + + +
test_sync_changed_book
+ + PASS + + + + +
test_sync_invalid
@@ -1036,17 +1022,53 @@ AssertionError: 'http[35 chars]65c2703d57c660b93b6ebdafa/{ImageId}/image.jpg' != + + + +
test_sync_reading_state
+ + PASS + + + + + + +
test_sync_shelf
+ + PASS + + + + + + +
test_sync_unchanged
+ + PASS + + + + + + +
test_sync_upload
+ + PASS + + + test_ldap.test_ldap_login - 8 - 8 + 9 + 9 0 0 0 - Detail + Detail @@ -1123,6 +1145,15 @@ AssertionError: 'http[35 chars]65c2703d57c660b93b6ebdafa/{ImageId}/image.jpg' != + + + +
test_ldap_opds_download_book
+ + PASS + + + @@ -1209,7 +1240,7 @@ AssertionError: 'http[35 chars]65c2703d57c660b93b6ebdafa/{ImageId}/image.jpg' !=
Traceback (most recent call last):
-  File "/home/matthias/Entwicklung/calibre-web-test/test/test_logging.py", line 136, in test_logfile_recover
+  File "/home/matthias/Entwicklung/calibre-web-test/test/test_logging.py", line 137, in test_logfile_recover
     self.assertTrue(logpath=="", "logfile config value is not empty after reseting to default")
 AssertionError: False is not true : logfile config value is not empty after reseting to default
@@ -1354,8 +1385,8 @@ AssertionError: False is not true : logfile config value is not empty after rese test_opds_feed.test_opds_feed 20 - 20 - 0 + 19 + 1 0 0 @@ -1509,11 +1540,31 @@ AssertionError: False is not true : logfile config value is not empty after rese - +
test_opds_shelf_access
- PASS + +
+ FAIL +
+ + + + @@ -2205,8 +2256,8 @@ AssertionError: False is not true : logfile config value is not empty after rese Total - 186 - 177 + 192 + 183 2 0 7 @@ -2253,6 +2304,12 @@ AssertionError: False is not true : logfile config value is not empty after rese Basic + + backports-abc + 0.5 + Basic + + Flask 1.1.2 @@ -2283,6 +2340,12 @@ AssertionError: False is not true : logfile config value is not empty after rese Basic + + Jinja2 + 2.11.2 + Basic + + PyPDF2 1.26.0 @@ -2325,12 +2388,24 @@ AssertionError: False is not true : logfile config value is not empty after rese Basic + + Unidecode + 1.1.1 + Basic + + Wand 0.5.9 Basic + + Werkzeug + 1.0.1 + Basic + + lxml 4.5.0 @@ -2339,7 +2414,7 @@ AssertionError: False is not true : logfile config value is not empty after rese Pillow - 7.1.1 + 7.1.2 test_edit_books @@ -2381,7 +2456,7 @@ AssertionError: False is not true : logfile config value is not empty after rese