[bug] Handle deleted Part (#12578)

This commit is contained in:
Oliver
2026-08-08 21:56:25 +10:00
committed by GitHub
parent 6cdc21c308
commit 28fea388f6
+3 -1
View File
@@ -2782,7 +2782,9 @@ class PartPricing(common.models.MetaMixin):
try: try:
self.refresh_from_db() self.refresh_from_db()
except PartPricing.DoesNotExist: except PartPricing.DoesNotExist:
pass # The underlying Part (and this pricing entry) has been deleted
# since this update was scheduled - nothing to do
return
self.update_bom_cost(save=False) self.update_bom_cost(save=False)
self.update_purchase_cost(save=False) self.update_purchase_cost(save=False)