Account for cases where serial number could be an integer!

This commit is contained in:
Oliver Walters 2022-04-22 01:00:02 +10:00
parent aa4df62ac9
commit 292d28d378

View File

@ -454,11 +454,11 @@ class StockItem(MPTTModel):
super().clean()
# Strip serial number field
if self.serial:
if type(self.serial) is str:
self.serial = self.serial.strip()
# Strip batch code field
if self.batch:
if type(self.batch) is str:
self.batch = self.batch.strip()
try: