From ee87cd7b23ae6b0fdca971de9322c76a6cb11810 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 21:06:28 +1100 Subject: [PATCH] Ignore inactive parts (#9125) (#9128) (cherry picked from commit 6930ae712231eb26c62320c8981821b4daf4f193) Co-authored-by: Oliver --- src/backend/InvenTree/part/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/InvenTree/part/models.py b/src/backend/InvenTree/part/models.py index dd5e418ef4..eda1d17fd9 100644 --- a/src/backend/InvenTree/part/models.py +++ b/src/backend/InvenTree/part/models.py @@ -2838,6 +2838,9 @@ class PartPricing(common.models.MetaMixin): for sub_part in bom_item.get_valid_parts_for_allocation(): # Check each part which *could* be used + if sub_part != bom_item.sub_part and not sub_part.active: + continue + sub_part_pricing = sub_part.pricing sub_part_min = self.convert(sub_part_pricing.overall_min)