From 27b7d57080a1315f68361e3ab322abe38aaf0a0b Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Tue, 23 Mar 2021 12:03:33 +0100 Subject: [PATCH] Make extra user preferences behave like defaultdict This was the intention in https://github.com/galaxyproject/galaxy/pull/10747 and is an alternative to https://github.com/galaxyproject/galaxy/pull/11707 To test this, enable the file sources, and make sure you add a plugin you haven't configured in your user preferences. --- lib/galaxy/model/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/galaxy/model/__init__.py b/lib/galaxy/model/__init__.py index 6a1fa79283f..0cc32b70c65 100644 --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -386,7 +386,7 @@ class User(Dictifiable, RepresentById): extra_user_preferences = self.preferences.get('extra_user_preferences') if extra_user_preferences: try: - data = json.loads(extra_user_preferences) + data.update(json.loads(extra_user_preferences)) except Exception: pass return data