Fix some master3 edit issues for products view
This commit is contained in:
parent
96421ee1e5
commit
eefc3b33d7
|
@ -498,9 +498,8 @@ class ProductsView(MasterView):
|
||||||
form = self.make_form(instance)
|
form = self.make_form(instance)
|
||||||
product_deleted = instance.deleted
|
product_deleted = instance.deleted
|
||||||
if self.request.method == 'POST':
|
if self.request.method == 'POST':
|
||||||
if form.validate():
|
if self.validate_form(form):
|
||||||
self.save_form(form)
|
self.save_edit_form(form)
|
||||||
self.after_edit(instance)
|
|
||||||
self.request.session.flash("{} {} has been updated.".format(
|
self.request.session.flash("{} {} has been updated.".format(
|
||||||
self.get_model_title(), self.get_instance_title(instance)))
|
self.get_model_title(), self.get_instance_title(instance)))
|
||||||
return self.redirect(self.get_action_url('view', instance))
|
return self.redirect(self.get_action_url('view', instance))
|
||||||
|
|
Loading…
Reference in a new issue