2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 19:45:46 +00:00

Add a reminder for future-self

This commit is contained in:
Oliver Walters
2019-09-17 20:19:27 +10:00
parent cb77506111
commit a77fd23fcf
2 changed files with 3 additions and 1 deletions

View File

@ -1140,6 +1140,8 @@ class BomItem(models.Model):
if self.part == self.sub_part:
raise ValidationError({'sub_part': _('Part cannot be added to its own Bill of Materials')})
# TODO - Make sure that there is no recusion
# Test for simple recursion
for item in self.sub_part.bom_items.all():
if self.part == item.sub_part: