mirror of
https://github.com/NaN-tic/trytond-carrier_zip.git
synced 2023-12-14 02:13:03 +01:00
Fix AttributeError: 'NoneType' object has no attribute 'zips'
This commit is contained in:
parent
a1cf04ad70
commit
9d14e138c5
2
sale.py
2
sale.py
|
@ -72,7 +72,7 @@ class Sale:
|
||||||
shipment_zip = (self.shipment_address and self.shipment_address.zip
|
shipment_zip = (self.shipment_address and self.shipment_address.zip
|
||||||
or '')
|
or '')
|
||||||
carrier = self.carrier
|
carrier = self.carrier
|
||||||
if not carrier.zips:
|
if not carrier or not carrier.zips:
|
||||||
return res
|
return res
|
||||||
if (carrier and shipment_zip):
|
if (carrier and shipment_zip):
|
||||||
for carrier_zip in carrier.zips:
|
for carrier_zip in carrier.zips:
|
||||||
|
|
Loading…
Reference in a new issue