From d03553be7a4cb568c498f0f27281935b2da59994 Mon Sep 17 00:00:00 2001 From: Yogesh Mahajan Date: Thu, 2 Jan 2025 18:12:24 +0530 Subject: [PATCH] Fix the error occurring while loading preferences on startup. #8256 --- web/pgadmin/utils/preferences.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/pgadmin/utils/preferences.py b/web/pgadmin/utils/preferences.py index ecf607eb6..c26c71cb0 100644 --- a/web/pgadmin/utils/preferences.py +++ b/web/pgadmin/utils/preferences.py @@ -134,7 +134,6 @@ class _Preference(): except Exception as e: current_app.logger.exception(e) return self.default - return res.value def _get_format_data(self, res): """ @@ -149,10 +148,11 @@ class _Preference(): if 'value' in opt and opt['value'] == res.value: return True, res.value - if self.control_props and self.control_props['creatable']: + if self.control_props and 'creatable' in self.control_props and \ + self.control_props['creatable']: return True, res.value - if self.select and self.select['tags']: + if self.select and 'tags' in self.select and self.select['tags']: return True, res.value return True, self.default if self._type == 'select':