Skip to content
Snippets Groups Projects
Commit 2db946d2 authored by Benjamin Bertrand's avatar Benjamin Bertrand
Browse files

Fix validation error when field is disabled

If a selectfield is disabled, None is returned (not a string).
To pass wtforms validation, that value shall be part of the choices.

We use None as the value for SelectField that are optional (instead of
'').
We were previously converting '' to None when creating a model.
We now use the coerce function to let the form convert 'None' to None.
parent e7b56c45
No related branches found
No related tags found
Loading
Loading
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