From 5405dc5141fafdc95868199bb4315ffabd6cee2f Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sun, 17 May 2020 11:15:46 +0200 Subject: [PATCH] Fix for #1387 (saving settings with enabled gdrive metadata watch led to crash) --- cps/admin.py | 3 --- cps/config_sql.py | 4 ++++ optional-requirements.txt | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cps/admin.py b/cps/admin.py index ccfef4e1..aa46e8b6 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -178,9 +178,6 @@ def update_view_configuration(): _config_int("config_authors_max") _config_int("config_restricted_column") - if config.config_google_drive_watch_changes_response: - config.config_google_drive_watch_changes_response = json.dumps(config.config_google_drive_watch_changes_response) - config.config_default_role = constants.selected_roles(to_save) config.config_default_role &= ~constants.ROLE_ANONYMOUS diff --git a/cps/config_sql.py b/cps/config_sql.py index 590b8eea..bb88b7a3 100644 --- a/cps/config_sql.py +++ b/cps/config_sql.py @@ -279,6 +279,10 @@ class _ConfigSQL(object): '''Apply all configuration values to the underlying storage.''' s = self._read_from_storage() # type: _Settings + if self.config_google_drive_watch_changes_response: + self.config_google_drive_watch_changes_response = json.dumps( + self.config_google_drive_watch_changes_response) + for k, v in self.__dict__.items(): if k[0] == '_': continue diff --git a/optional-requirements.txt b/optional-requirements.txt index ba6e8296..d830e700 100644 --- a/optional-requirements.txt +++ b/optional-requirements.txt @@ -1,9 +1,9 @@ # GDrive Integration google-api-python-client==1.7.11,<1.8.0 -gevent>=1.2.1,<20.6.0 +#gevent>=1.2.1,<20.6.0 greenlet>=0.4.12,<0.5.0 httplib2>=0.9.2,<0.18.0 -oauth2client>=4.0.0,<4.14.0 +oauth2client>=4.0.0,<4.1.4 uritemplate>=3.0.0,<3.1.0 pyasn1-modules>=0.0.8,<0.3.0 pyasn1>=0.1.9,<0.5.0