Commit c59d33a6 authored by Serge S. Koval's avatar Serge S. Koval

Compatibility fix #83. Explicitly pass None to the create_form/edit_form methods

parent 4ffb88b3
...@@ -821,7 +821,7 @@ class BaseModelView(BaseView, ActionsMixin): ...@@ -821,7 +821,7 @@ class BaseModelView(BaseView, ActionsMixin):
if not self.can_create: if not self.can_create:
return redirect(return_url) return redirect(return_url)
form = self.create_form() form = self.create_form(None)
if form.validate_on_submit(): if form.validate_on_submit():
if self.create_model(form): if self.create_model(form):
...@@ -854,7 +854,7 @@ class BaseModelView(BaseView, ActionsMixin): ...@@ -854,7 +854,7 @@ class BaseModelView(BaseView, ActionsMixin):
if model is None: if model is None:
return redirect(return_url) return redirect(return_url)
form = self.edit_form(obj=model) form = self.edit_form(None, obj=model)
if form.validate_on_submit(): if form.validate_on_submit():
if self.update_model(form, model): if self.update_model(form, model):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment