Don't choke when unit size is not decimal-compatible
This commit is contained in:
parent
2faa0cb18b
commit
ca14884c46
|
@ -140,7 +140,10 @@ class ProductImporter(importing.model.ProductImporter):
|
||||||
|
|
||||||
unit_size = None
|
unit_size = None
|
||||||
if 'size' in core_data and core_data['size'] is not None:
|
if 'size' in core_data and core_data['size'] is not None:
|
||||||
unit_size = decimal.Decimal(core_data['size'])
|
try:
|
||||||
|
unit_size = decimal.Decimal(core_data['size'])
|
||||||
|
except decimal.InvalidOperation:
|
||||||
|
pass
|
||||||
|
|
||||||
uom_abbrev = core_data.get('unitofmeasure')
|
uom_abbrev = core_data.get('unitofmeasure')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue