Fix AttributeError: 'NoneType' object has no attribute 'zips'

This commit is contained in:
jmartin 2015-01-28 16:18:01 +01:00
parent a1cf04ad70
commit 9d14e138c5
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ class Sale:
shipment_zip = (self.shipment_address and self.shipment_address.zip
or '')
carrier = self.carrier
if not carrier.zips:
if not carrier or not carrier.zips:
return res
if (carrier and shipment_zip):
for carrier_zip in carrier.zips: