[bug] Handle deleted Part (#12578) (#12586)

(cherry picked from commit 28fea388f6)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
github-actions[bot]
2026-08-09 07:30:43 +10:00
committed by GitHub
co-authored by Oliver
parent e013f03422
commit 8df20e39ab
+3 -1
View File
@@ -2957,7 +2957,9 @@ class PartPricing(common.models.MetaMixin):
try:
self.refresh_from_db()
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_purchase_cost(save=False)