Resolved an issue where, in cases where there was no existing localized title and the default title was submitted, the submitted account title or currency name would be erroneously saved as the localized title.

This commit is contained in:
依瑪貓 2023-04-30 14:23:42 +08:00
parent 2969e83afe
commit b718d19450

View File

@ -182,6 +182,8 @@ class Account(db.Model):
:param value: The new title. :param value: The new title.
:return: None. :return: None.
""" """
if self.title == value:
return
if self.title_l10n is None: if self.title_l10n is None:
self.title_l10n = value self.title_l10n = value
return return
@ -424,6 +426,8 @@ class Currency(db.Model):
:param value: The new name. :param value: The new name.
:return: None. :return: None.
""" """
if self.name == value:
return
if self.name_l10n is None: if self.name_l10n is None:
self.name_l10n = value self.name_l10n = value
return return