diff --git a/cps/admin.py b/cps/admin.py index 328ee606..03b306a8 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -636,7 +636,7 @@ def pathchooser(): "parentdir": parentdir, "type": browse_for, "oldfile": oldfile, - "absolute": abs, + "absolute": absolute, } return json.dumps(context) diff --git a/cps/ub.py b/cps/ub.py index f342e356..1969ef53 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -227,9 +227,6 @@ class Anonymous(AnonymousUserMixin, UserBase): self.denied_column_value = data.denied_column_value self.allowed_column_value = data.allowed_column_value self.view_settings = data.view_settings - # Initialize flask_session once - if 'view' not in flask_session: - flask_session['view']={} def role_admin(self): @@ -248,14 +245,18 @@ class Anonymous(AnonymousUserMixin, UserBase): return False def get_view_property(self, page, prop): - if not flask_session['view'].get(page): - return None - return flask_session['view'][page].get(prop) + if 'view' in flask_session: + if not flask_session['view'].get(page): + return None + return flask_session['view'][page].get(prop) + return None def set_view_property(self, page, prop, value): - if not flask_session['view'].get(page): - flask_session['view'][page] = dict() - flask_session['view'][page][prop] = value + if 'view' in flask_session: + if not flask_session['view'].get(page): + flask_session['view'][page] = dict() + flask_session['view'][page][prop] = value + return None # Baseclass representing Shelfs in calibre-web in app.db diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index 5949373d..e0c802ef 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
-

Start Time: 2021-01-10 18:12:04

+

Start Time: 2021-01-23 19:48:56

-

Stop Time: 2021-01-10 20:39:46

+

Stop Time: 2021-01-23 22:16:21

-

Duration: 1h 59 min

+

Duration: 2h 0 min

@@ -611,15 +611,15 @@ - + TestEbookConvertGDriveKepubify - 5 - 1 - 1 + 3 3 0 + 0 + 0 - Detail + Detail @@ -634,126 +634,20 @@ - +
TestEbookConvertGDriveKepubify - test_convert_only
- -
- FAIL -
- - - - + PASS - - -
TestEbookConvertGDriveKepubify - test_convert_only
- - -
- ERROR -
- - - - - - - - - +
TestEbookConvertGDriveKepubify - test_convert_wrong_excecutable
- -
- ERROR -
- - - - - - - - - - -
TestEbookConvertGDriveKepubify - test_convert_wrong_excecutable
- - -
- ERROR -
- - - - + PASS @@ -1593,48 +1487,51 @@ selenium.common.exceptions.TimeoutException: Message: - - TestSetupGdrive + + TestFilePicker + 3 + 2 1 0 0 - 1 - 0 - Detail + Detail - + -
TestSetupGdrive - test_config_gdrive
+
TestFilePicker - test_filepicker_all_file
+ + PASS + + + + + + +
TestFilePicker - test_filepicker_limited_file
- ERROR + FAIL
-