From 292d28d3786c6d8179736db51f029f54ef3afb80 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 22 Apr 2022 01:00:02 +1000 Subject: [PATCH] Account for cases where serial number could be an integer! --- InvenTree/stock/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index 12131b5b58..fa343e9a9c 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -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: