Allow for missing vendor abbreviation, when importing from CORE

This commit is contained in:
Lance Edgar 2020-06-29 19:06:57 -05:00
parent 40cb18f0cc
commit 4402d79052

View file

@ -401,7 +401,7 @@ class VendorImporter(FromCOREPOSAPI, corepos_importing.model.VendorImporter):
return { return {
'corepos_id': int(vendor['vendorID']), 'corepos_id': int(vendor['vendorID']),
'name': vendor['vendorName'], 'name': vendor['vendorName'],
'abbreviation': vendor['vendorAbbreviation'] or None, 'abbreviation': vendor.get('vendorAbbreviation') or None,
'special_discount': decimal.Decimal(vendor['discountRate']), 'special_discount': decimal.Decimal(vendor['discountRate']),
'phone_number': vendor.get('phone') or None, 'phone_number': vendor.get('phone') or None,
'fax_number': vendor.get('fax') or None, 'fax_number': vendor.get('fax') or None,