handle non-int serial range suggestions cleanly

This commit is contained in:
Ben Charlton 2020-08-24 20:00:19 +01:00
parent d5a374f1fd
commit 0da2682c68

View File

@ -367,6 +367,9 @@ class Part(MPTTModel):
sn = self.getNextSerialNumber() sn = self.getNextSerialNumber()
if sn is None:
return None
if quantity >= 2: if quantity >= 2:
sn = "{n}-{m}".format( sn = "{n}-{m}".format(
n=sn, n=sn,