Fix the error occurring while loading preferences on startup. #8256

This commit is contained in:
Yogesh Mahajan 2025-01-02 18:12:24 +05:30 committed by GitHub
parent 5dc52446f3
commit d03553be7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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