mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-10 23:45:58 -06:00
Fixed typo in exception keyword. Fixes #5539
This commit is contained in:
parent
e10f1274dc
commit
09b76b306c
@ -18,3 +18,4 @@ Bug fixes
|
|||||||
*********
|
*********
|
||||||
|
|
||||||
| `Issue #5416 <https://redmine.postgresql.org/issues/5416>`_ - Ensure that the query tool panel gets closed when clicking on the 'Don't Save' button.
|
| `Issue #5416 <https://redmine.postgresql.org/issues/5416>`_ - Ensure that the query tool panel gets closed when clicking on the 'Don't Save' button.
|
||||||
|
| `Issue #5539 <https://redmine.postgresql.org/issues/5539>`_ - Fixed typo in exception keyword.
|
@ -120,19 +120,19 @@ class _Preference(object):
|
|||||||
try:
|
try:
|
||||||
return int(res.value)
|
return int(res.value)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
current_app.logger.exeception(e)
|
current_app.logger.exception(e)
|
||||||
return self.default
|
return self.default
|
||||||
if self._type == 'numeric':
|
if self._type == 'numeric':
|
||||||
try:
|
try:
|
||||||
return decimal.Decimal(res.value)
|
return decimal.Decimal(res.value)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
current_app.logger.exeception(e)
|
current_app.logger.exception(e)
|
||||||
return self.default
|
return self.default
|
||||||
if self._type == 'date' or self._type == 'datetime':
|
if self._type == 'date' or self._type == 'datetime':
|
||||||
try:
|
try:
|
||||||
return dateutil_parser.parse(res.value)
|
return dateutil_parser.parse(res.value)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
current_app.logger.exeception(e)
|
current_app.logger.exception(e)
|
||||||
return self.default
|
return self.default
|
||||||
if self._type == 'options':
|
if self._type == 'options':
|
||||||
for opt in self.options:
|
for opt in self.options:
|
||||||
@ -149,7 +149,7 @@ class _Preference(object):
|
|||||||
try:
|
try:
|
||||||
return json.loads(res.value)
|
return json.loads(res.value)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
current_app.logger.exeception(e)
|
current_app.logger.exception(e)
|
||||||
return self.default
|
return self.default
|
||||||
|
|
||||||
return res.value
|
return res.value
|
||||||
@ -194,13 +194,13 @@ class _Preference(object):
|
|||||||
try:
|
try:
|
||||||
value = dateutil_parser.parse(value).date()
|
value = dateutil_parser.parse(value).date()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
current_app.logger.exeception(e)
|
current_app.logger.exception(e)
|
||||||
return False, gettext("Invalid value for a date option.")
|
return False, gettext("Invalid value for a date option.")
|
||||||
elif self._type == 'datetime':
|
elif self._type == 'datetime':
|
||||||
try:
|
try:
|
||||||
value = dateutil_parser.parse(value)
|
value = dateutil_parser.parse(value)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
current_app.logger.exeception(e)
|
current_app.logger.exception(e)
|
||||||
return False, gettext("Invalid value for a datetime option.")
|
return False, gettext("Invalid value for a datetime option.")
|
||||||
elif self._type == 'options':
|
elif self._type == 'options':
|
||||||
has_value = False
|
has_value = False
|
||||||
@ -214,7 +214,7 @@ class _Preference(object):
|
|||||||
try:
|
try:
|
||||||
value = json.dumps(value)
|
value = json.dumps(value)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
current_app.logger.exeception(e)
|
current_app.logger.exception(e)
|
||||||
return False, gettext(
|
return False, gettext(
|
||||||
"Invalid value for a keyboard shortcut option."
|
"Invalid value for a keyboard shortcut option."
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user