Skip to content
Snippets Groups Projects
Commit 140c8c5b authored by Jakub Judiny's avatar Jakub Judiny
Browse files

Changed ValueError to ValidationError

(Redmine issue: #7632)
parent 7bc31084
No related branches found
No related tags found
No related merge requests found
......@@ -596,7 +596,7 @@ class RadioFieldWithNone(wtforms.RadioField):
if self.data == val:
break
else:
raise ValueError(self.gettext("Not a valid choice"))
raise wtforms.validators.ValidationError(self.gettext("Not a valid choice"))
class SelectFieldWithNone(wtforms.SelectField):
......@@ -619,7 +619,7 @@ class SelectFieldWithNone(wtforms.SelectField):
if self.data == val:
break
else:
raise ValueError(self.gettext("Not a valid choice"))
raise wtforms.validators.ValidationError(self.gettext("Not a valid choice"))
class BaseItemForm(flask_wtf.FlaskForm):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment