Commit 9388b78c authored by Sean Lynch's avatar Sean Lynch

Remove explicit session flush (and thus ordering of on_model_change and session flushing)

parent 0118dfbe
......@@ -584,7 +584,6 @@ class ModelView(BaseModelView):
model = self.model()
form.populate_obj(model)
self.session.add(model)
self.session.flush()
self.on_model_change(form, model)
self.session.commit()
return True
......@@ -605,7 +604,6 @@ class ModelView(BaseModelView):
try:
form.populate_obj(model)
self.on_model_change(form, model)
self.session.flush()
self.session.commit()
return True
except Exception, ex:
......
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