Skip to content

Commit

Permalink
Allow duplicate BOM items when duplicating a part (#5347) (#5350)
Browse files Browse the repository at this point in the history
(cherry picked from commit 6660508)

Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
  • Loading branch information
github-actions[bot] and SchrodingersGat committed Jul 26, 2023
1 parent 072b7b3 commit 46da332
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions InvenTree/part/models.py
Expand Up @@ -2031,10 +2031,6 @@ def copy_bom_from(self, other, clear=True, **kwargs):
if bom_item.part in my_ancestors and bom_item.inherited:
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
if not bom_item.sub_part.check_add_to_bom(self, raise_error=raise_error):
continue
Expand Down

0 comments on commit 46da332

Please sign in to comment.