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