Fixed the type hint of the form parameter in the NeedSomeJournalEntries validator.

This commit is contained in:
依瑪貓 2023-03-11 19:07:43 +08:00
parent 53565eb9e6
commit 8e219d8006

View File

@ -52,8 +52,7 @@ class CurrencyExists:
class NeedSomeJournalEntries:
"""The validator to check if there is any journal entry sub-form."""
def __call__(self, form: TransferCurrencyForm, field: FieldList) \
-> None:
def __call__(self, form: FlaskForm, field: FieldList) -> None:
if len(field) == 0:
raise ValidationError(lazy_gettext(
"Please add some journal entries."))