Use empty string instead of null as fallback value, for pricing rows CSV

This commit is contained in:
Lance Edgar 2018-11-26 19:25:32 -06:00
parent d773043429
commit 25e61cc8d5

View file

@ -201,11 +201,11 @@ class PricingBatchView(BatchMasterView):
vendor = row.vendor vendor = row.vendor
if 'vendor_id' in fields: if 'vendor_id' in fields:
csvrow['vendor_id'] = vendor.id if vendor else None csvrow['vendor_id'] = (vendor.id or '') if vendor else ''
if 'vendor_abbreviation' in fields: if 'vendor_abbreviation' in fields:
csvrow['vendor_abbreviation'] = vendor.abbreviation if vendor else None csvrow['vendor_abbreviation'] = (vendor.abbreviation or '') if vendor else ''
if 'vendor_name' in fields: if 'vendor_name' in fields:
csvrow['vendor_name'] = vendor.name if vendor else None csvrow['vendor_name'] = (vendor.name or '') if vendor else ''
return csvrow return csvrow