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
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