Multi-site "satchmo_rebuild_pricing" deletes pricing for other sites.

Issue #1167 resolved
Patrick Kimber
created an issue

In a multi-site Satchmo shop, the "satchmo_rebuild_pricing" management command deletes prices for sites which have already been processed: The "" management command iterates through the sites one at a time: The command correctly creates the pricing for the first site, then moves onto the second site. As part of the routine, the old prices for a product are deleted: The problem is, the "delete_for_product" method removes all pricing for a product slug without filtering by the site ID:

{{{ def delete_for_product(self, product): for obj in self.filter(productslug=product.slug): obj.delete() }}}

  • To solve the problem, I think we should add a site filter to the "delete_for_product" method i.e:

{{{ def delete_for_product(self, product): for obj in self.filter(productslug=product.slug, obj.delete() }}}

Comments (2)

  1. Log in to comment