2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-06 05:30:56 +00:00

Merge branch 'fix-boolean' of https://github.com/matmair/InvenTree into fix-boolean

This commit is contained in:
Matthias
2022-05-15 17:52:34 +02:00
79 changed files with 1682 additions and 1215 deletions

View File

@ -556,7 +556,14 @@ class StockItem(MPTTModel):
# If the item points to a build, check that the Part references match
if self.build:
if not self.part == self.build.part:
if self.part == self.build.part:
# Part references match exactly
pass
elif self.part in self.build.part.get_conversion_options():
# Part reference is one of the valid conversion options for the build output
pass
else:
raise ValidationError({
'build': _("Build reference does not point to the same part object")
})