2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 19:46:46 +00:00

Ignore inactive parts (#9125) (#9128)

(cherry picked from commit 6930ae712231eb26c62320c8981821b4daf4f193)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
github-actions[bot] 2025-02-21 21:06:28 +11:00 committed by GitHub
parent 940abaa179
commit ee87cd7b23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2838,6 +2838,9 @@ class PartPricing(common.models.MetaMixin):
for sub_part in bom_item.get_valid_parts_for_allocation(): for sub_part in bom_item.get_valid_parts_for_allocation():
# Check each part which *could* be used # 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_pricing = sub_part.pricing
sub_part_min = self.convert(sub_part_pricing.overall_min) sub_part_min = self.convert(sub_part_pricing.overall_min)