-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoneBlankField does not work with flask-admin (i.e. prevents validation of EmailField) #44
Comments
Fixed! |
Fixed in 0.7 I should say! |
Although - Flask-SuperAdmin doesn't use NoneBlankField... |
First of all, thank you @rozza for the very fast fix! I'm afraid I've to bother you again, observing that if you take the above testcase and replace Do you want me to submit a new issue? |
@mapio no problems updated it to use NoneStringField as well |
I think this is not fixed, yet.... or maybe just partially |
The fix described in #9 seems to break flask-admin.
More precisely, given the following test case
If one tries to create a new record
None
appears as the default value for theemail
field – this is a first bug.If a save is attempted a form validation error happens (since, of course,
None
is not a valid email address):In the case the field is first cleaned (leaving it empty) and then saved, a model validation happens – this is a second bug, given that if the forms validate, the model should also:
(observe that in the screenshot
None
reappeared as the field value, even if it was empty before the save button was hit).The text was updated successfully, but these errors were encountered: