mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-06 05:30:56 +00:00
Bug fix for stock serial numbers:
- empty strings do not count as a valid serial number
This commit is contained in:
@ -350,7 +350,7 @@ class StockItem(MPTTModel):
|
||||
@property
|
||||
def serialized(self):
|
||||
""" Return True if this StockItem is serialized """
|
||||
return self.serial is not None and self.quantity == 1
|
||||
return self.serial is not None and len(str(self.serial).strip()) > 0 and self.quantity == 1
|
||||
|
||||
def validate_unique(self, exclude=None):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user