Bug fix for BOM uploading

(cherry picked from commit 2e04b311306259e0ead07de9e08b3ba376caf4e4)
This commit is contained in:
Oliver 2021-11-20 18:07:39 +11:00
parent f8aa5514ae
commit 6a6eae7e54

View File

@ -1587,7 +1587,7 @@ class Part(MPTTModel):
# Exclude any parts that this part is used *in* (to prevent recursive BOMs)
used_in = self.get_used_in().all()
parts = parts.exclude(id__in=[item.part.id for item in used_in])
parts = parts.exclude(id__in=[part.id for part in used_in])
return parts