diff --git a/flask_admin/model/base.py b/flask_admin/model/base.py index c92b1dc96..c418501ea 100755 --- a/flask_admin/model/base.py +++ b/flask_admin/model/base.py @@ -2162,7 +2162,7 @@ def edit_view(self): return redirect(self.get_save_return_url(model, is_created=False)) if request.method == 'GET' or form.errors: - self.on_form_prefill(form, id) + self.on_form_prefill(form, model) form_opts = FormOpts(widget_args=self.form_widget_args, form_rules=self._form_edit_rules)