[FIX] delivery_stamps: Only use DimWeighting if the rate has it.

This commit is contained in:
Jared Kipe
2021-02-09 12:13:03 -08:00
parent eabaa3a303
commit 9df0c4b95f

View File

@@ -274,6 +274,7 @@ class ProviderStamps(models.Model):
shipping.Amount = rate.Amount shipping.Amount = rate.Amount
shipping.ServiceType = rate.ServiceType shipping.ServiceType = rate.ServiceType
shipping.DeliverDays = rate.DeliverDays shipping.DeliverDays = rate.DeliverDays
if hasattr(rate, 'DimWeighting'):
shipping.DimWeighting = rate.DimWeighting shipping.DimWeighting = rate.DimWeighting
shipping.Zone = rate.Zone shipping.Zone = rate.Zone
shipping.RateCategory = rate.RateCategory shipping.RateCategory = rate.RateCategory