mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge pull request #2697 from SchrodingersGat/allocation-bug
Bug fix for BuildOrder.bom_items
This commit is contained in:
commit
35451be4f2
@ -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):
|
||||
|
@ -1453,7 +1453,9 @@ class Part(MPTTModel):
|
||||
By default, will include inherited BOM items
|
||||
"""
|
||||
|
||||
return BomItem.objects.filter(self.get_bom_item_filter(include_inherited=include_inherited))
|
||||
queryset = BomItem.objects.filter(self.get_bom_item_filter(include_inherited=include_inherited))
|
||||
|
||||
return queryset.prefetch_related('sub_part')
|
||||
|
||||
def get_installed_part_options(self, include_inherited=True, include_variants=True):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user