2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 12:35:46 +00:00

Bug fix for BuildOrder.bom_items

- Now uses the query generator provided by the Part model
- No more code duplication
- More importantly, no more code duplication which is WRONG!
This commit is contained in:
Oliver
2022-03-01 23:53:33 +11:00
parent a30e478412
commit 28a7ad7f0e
2 changed files with 4 additions and 4 deletions

View File

@ -383,9 +383,7 @@ class Build(MPTTModel, ReferenceIndexingMixin):
Returns the BOM items for the part referenced by this BuildOrder
"""
return self.part.bom_items.all().prefetch_related(
'sub_part'
)
return self.part.get_bom_items()
@property
def tracked_bom_items(self):