Changeset - ca14884c460e
[Not reviewed]
0 1 0
Lance Edgar - 4 years ago 2021-01-21 17:58:11
lance@edbob.org
Don't choke when unit size is not decimal-compatible
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general) First comment
rattail_corepos/importing/model.py
Show inline comments
 
@@ -140,7 +140,10 @@ class ProductImporter(importing.model.ProductImporter):
 

	
 
        unit_size = 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')
 

	
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now