2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 12:35:46 +00:00

make operators simpler

This commit is contained in:
Matthias
2022-05-15 17:52:23 +02:00
parent af8bddf690
commit 77aeecf23a
12 changed files with 25 additions and 25 deletions

View File

@ -777,7 +777,7 @@ class Build(MPTTModel, ReferenceIndexingMixin):
if not output.is_building:
raise ValidationError(_("Build output is already completed"))
if not output.build == self:
if output.build != self:
raise ValidationError(_("Build output does not match Build Order"))
# Unallocate all build items against the output
@ -1240,7 +1240,7 @@ class BuildItem(models.Model):
})
# Quantity must be 1 for serialized stock
if self.stock_item.serialized and not self.quantity == 1:
if self.stock_item.serialized and self.quantity != 1:
raise ValidationError({
'quantity': _('Quantity must be 1 for serialized stock')
})