Prevent "there were some errors" from being flashed twice

This commit is contained in:
richard-dds 2019-08-09 15:54:41 -04:00
parent 71bb1be130
commit bc0fd4900a

View File

@ -74,6 +74,9 @@ class AttachmentForm(BaseForm):
object_name = HiddenField(id="attachment_object_name", validators=[Length(max=40)])
accept = ".pdf,application/pdf"
def validate(self, *args, **kwargs):
return super().validate(*args, **{**kwargs, "flash_invalid": False})
class TaskOrderForm(BaseForm):
number = StringField(label=translate("forms.task_order.number_description"))