2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 03:00:54 +00:00

PEP style fixes

This commit is contained in:
Oliver Walters
2020-04-21 22:37:35 +10:00
parent b75c343236
commit 09ccd6c5e2
4 changed files with 5 additions and 6 deletions

View File

@ -268,7 +268,7 @@ class StockItem(MPTTModel):
# the "Part" that the line item references is the same as the part that THIS references
if self.sales_order_line is not None:
if self.sales_order_line.part == None:
if self.sales_order_line.part is None:
raise ValidationError({'sales_order_line': _('Stock item cannot be assigned to a LineItem which does not reference a part')})
if not self.sales_order_line.part == self.part: