From 0cf34802b70a076fb009a2ba2e53889f4dc19b07 Mon Sep 17 00:00:00 2001 From: Bernat Brunet Date: Thu, 29 Oct 2020 16:50:09 +0100 Subject: [PATCH] Fix bug on list call --- shipment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shipment.py b/shipment.py index 05895b7..5cb1838 100644 --- a/shipment.py +++ b/shipment.py @@ -247,7 +247,7 @@ class ShipmentIn(EdifactMixin, metaclass=PoolMeta): ('state', 'in', ('processing', 'done')) ]) if len(purchases) == 1: - purchase = purchase[0] + purchase = purchases[0] if not purchase: error_msg = 'Purchase number {} not found'.format(purchase_num) serialized_segment = Serializer(control_chars).serialize([segment])