Revised the coding style of the NeedSomeCurrencies validator.

This commit is contained in:
依瑪貓 2023-03-14 21:42:02 +08:00
parent d9ecf51c6d
commit 5c6bfd8b49

View File

@ -51,8 +51,7 @@ class NeedSomeCurrencies:
def __call__(self, form: FlaskForm, field: FieldList) -> None: def __call__(self, form: FlaskForm, field: FieldList) -> None:
if len(field) == 0: if len(field) == 0:
raise ValidationError(lazy_gettext( raise ValidationError(lazy_gettext("Please add some currencies."))
"Please add some currencies."))
class TransactionForm(FlaskForm): class TransactionForm(FlaskForm):