We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c732d83 + 70376a7 commit af4b255Copy full SHA for af4b255
flask_mongoengine/wtf/models.py
@@ -1,10 +1,11 @@
1
from flask_wtf import FlaskForm
2
+from flask_wtf.form import _Auto
3
4
5
class ModelForm(FlaskForm):
6
"""A WTForms mongoengine model form"""
7
- def __init__(self, formdata=None, **kwargs):
8
+ def __init__(self, formdata=_Auto, **kwargs):
9
self.instance = kwargs.pop("instance", None) or kwargs.get("obj")
10
if self.instance and not formdata:
11
kwargs["obj"] = self.instance
0 commit comments