~martijnbraam/shipments

67de43814a178b909f9aff0b7e0a4a703429c07f — Martijn Braam 2 years ago c9cf26b
carrier: ups: fix null in address parsing
1 files changed, 4 insertions(+), 0 deletions(-)

M shipments/carrier.py
M shipments/carrier.py => shipments/carrier.py +4 -0
@@ 270,6 270,10 @@ class UPS(Carrier):
            sa.address3 = a['streetAddress3']
            sa.postalcode = a['zipCode']
            sa.city = a['city']
            if a['state'] is None:
                a['state'] = ''
            if a['province'] is None:
                a['province'] = ''
            sa.state = (a['state'] + ' ' + a['province']).strip()
            sa.country = a['country']
            result.destination = sa