mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 19:46:46 +00:00
(cherry picked from commit 6660508326c3dc5a69b3aa13e0ccd02712b60dd7) Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
parent
072b7b3146
commit
46da332afe
@ -2031,10 +2031,6 @@ class Part(InvenTreeBarcodeMixin, InvenTreeNotesMixin, MetadataMixin, MPTTModel)
|
|||||||
if bom_item.part in my_ancestors and bom_item.inherited:
|
if bom_item.part in my_ancestors and bom_item.inherited:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Skip if already exists
|
|
||||||
if BomItem.objects.filter(part=self, sub_part=bom_item.sub_part).exists():
|
|
||||||
continue
|
|
||||||
|
|
||||||
# Skip (or throw error) if BomItem is not valid
|
# Skip (or throw error) if BomItem is not valid
|
||||||
if not bom_item.sub_part.check_add_to_bom(self, raise_error=raise_error):
|
if not bom_item.sub_part.check_add_to_bom(self, raise_error=raise_error):
|
||||||
continue
|
continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user