Commit c6f002f6 authored by Julian Gonggrijp's avatar Julian Gonggrijp

Add request method check on prefill hook as suggested by mrjoes

parent 8250d8a7
...@@ -1330,6 +1330,7 @@ class BaseModelView(BaseView, ActionsMixin): ...@@ -1330,6 +1330,7 @@ class BaseModelView(BaseView, ActionsMixin):
else: else:
return redirect(return_url) return redirect(return_url)
if request.method == 'GET':
self.on_form_prefill(form, id) self.on_form_prefill(form, id)
form_opts = FormOpts(widget_args=self.form_widget_args, form_opts = FormOpts(widget_args=self.form_widget_args,
......
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