Fix some master3 edit issues for products view

This commit is contained in:
Lance Edgar 2018-01-23 17:41:01 -06:00
parent 96421ee1e5
commit eefc3b33d7

View file

@ -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))