fix - bug of edit price features in distribution
This commit is contained in:
@@ -66,6 +66,14 @@ def update_quota_remaining(sender, instance, **kwargs):
|
||||
if getattr(instance, '_from_signal', False):
|
||||
return
|
||||
|
||||
# when delete object, prevent from update fields error
|
||||
# if kwargs.get('signal') == post_delete:
|
||||
if instance.trash:
|
||||
if instance.parent_distribution:
|
||||
remaining_distribution_weight(instance.parent_distribution)
|
||||
else:
|
||||
remaining_distribution_weight(instance)
|
||||
|
||||
|
||||
def update_product_stats(instance: Product, distribution: QuotaDistribution = None):
|
||||
""" update all stats of product """
|
||||
|
||||
Reference in New Issue
Block a user