Don't choke when unit size is not decimal-compatible

This commit is contained in:
Lance Edgar 2021-01-21 17:58:11 -06:00
parent 2faa0cb18b
commit ca14884c46

View file

@ -140,7 +140,10 @@ class ProductImporter(importing.model.ProductImporter):
unit_size = None
if 'size' in core_data and core_data['size'] is not None:
try:
unit_size = decimal.Decimal(core_data['size'])
except decimal.InvalidOperation:
pass
uom_abbrev = core_data.get('unitofmeasure')