Fixed the type hint of the form parameter in the NeedSomeJournalEntries validator.
This commit is contained in:
parent
53565eb9e6
commit
8e219d8006
@ -52,8 +52,7 @@ class CurrencyExists:
|
|||||||
class NeedSomeJournalEntries:
|
class NeedSomeJournalEntries:
|
||||||
"""The validator to check if there is any journal entry sub-form."""
|
"""The validator to check if there is any journal entry sub-form."""
|
||||||
|
|
||||||
def __call__(self, form: TransferCurrencyForm, field: FieldList) \
|
def __call__(self, form: FlaskForm, field: FieldList) -> None:
|
||||||
-> None:
|
|
||||||
if len(field) == 0:
|
if len(field) == 0:
|
||||||
raise ValidationError(lazy_gettext(
|
raise ValidationError(lazy_gettext(
|
||||||
"Please add some journal entries."))
|
"Please add some journal entries."))
|
||||||
|
Loading…
Reference in New Issue
Block a user