From fb9f7f6df694546985a236277174859b2016fd03 Mon Sep 17 00:00:00 2001 From: Cedric Collins Date: Mon, 13 Sep 2021 22:33:11 -0500 Subject: [PATCH] [FIX] delivery_ups_hibou: fix rate multi --- delivery_ups_hibou/models/ups_request_patch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/delivery_ups_hibou/models/ups_request_patch.py b/delivery_ups_hibou/models/ups_request_patch.py index 4fca9c9e..abe84a74 100644 --- a/delivery_ups_hibou/models/ups_request_patch.py +++ b/delivery_ups_hibou/models/ups_request_patch.py @@ -128,10 +128,10 @@ def patched_get_shipping_price(self, shipment_info, packages, shipper, ship_from } # Hibou Delivery - if hasattr(response.RatedShipment[0], 'GuaranteedDelivery') and hasattr( - response.RatedShipment[0].GuaranteedDelivery, 'BusinessDaysInTransit'): - rated_shipment['transit_days'] = int(response.RatedShipment[0].GuaranteedDelivery.BusinessDaysInTransit) + if hasattr(rate, 'GuaranteedDelivery') and hasattr(rate.GuaranteedDelivery, 'BusinessDaysInTransit'): + rated_shipment['transit_days'] = int(rate.GuaranteedDelivery.BusinessDaysInTransit) # End + rated_shipment['service_code'] = rate.Service.Code result.append(rated_shipment) return result