From 9e6209daa72c4ca7f3317c458566af687637d8a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 21 Oct 2022 13:19:57 +0200 Subject: [PATCH] Do not iterate on UPS notifications if it is None --- stock.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stock.py b/stock.py index dee7e5d230..5418dde100 100644 --- a/stock.py +++ b/stock.py @@ -352,6 +352,8 @@ class CreateShippingUPS(Wizard): return service_options def get_notifications(self, shipment): + if not shipment.carrier.ups_notifications: + return for code in shipment.carrier.ups_notifications: shipping_to_address = shipment.shipping_to_address email = shipping_to_address.contact_mechanism_get('email')