2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-01 13:06:45 +00:00

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() super().clean()
# Strip serial number field # Strip serial number field
if self.serial: if type(self.serial) is str:
self.serial = self.serial.strip() self.serial = self.serial.strip()
# Strip batch code field # Strip batch code field
if self.batch: if type(self.batch) is str:
self.batch = self.batch.strip() self.batch = self.batch.strip()
try: try: