Fix form validation
This commit is contained in:
parent
dd89e6fa9c
commit
993c071c7e
@ -38,8 +38,8 @@ class RefCompLoadForm(FlaskForm):
|
|||||||
submit = SubmitField("Valider")
|
submit = SubmitField("Valider")
|
||||||
cancel = SubmitField("Annuler")
|
cancel = SubmitField("Annuler")
|
||||||
|
|
||||||
def validate(self):
|
def validate(self, extra_validators=None):
|
||||||
if not super().validate():
|
if not super().validate(extra_validators):
|
||||||
return False
|
return False
|
||||||
if (self.referentiel_standard.data == "0") == (not self.upload.data):
|
if (self.referentiel_standard.data == "0") == (not self.upload.data):
|
||||||
self.referentiel_standard.errors.append(
|
self.referentiel_standard.errors.append(
|
||||||
|
Loading…
Reference in New Issue
Block a user