Saving with an empty (not required) EmailFiled fails
mapio opened this issue · 1 comments
mapio commented
It seems that the bug described in MongoEngine/flask-mongoengine#44 reproduces quite similarly here.
In particular, just change to email = EmailField()
line 31 in the example and you will get this error
which should not be (the None
looks suspicious).
rozza commented
Fixed in flask-mongoengine by not using the TextField but a custom field type: NoneStringField
that converts u""
to None: