From b105eb00970a62d2ef42ac816dfd3aa4eb0c6ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 29 Mar 2017 22:30:54 +0200 Subject: [PATCH] Make get_payments always return a list handle_entry expects to always receive a list of records so when no payment is found it should return an empty list instead of None. issue6380 review30181002 --- sepa_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sepa_handler.py b/sepa_handler.py index 7ebe88506a..e746bcb377 100644 --- a/sepa_handler.py +++ b/sepa_handler.py @@ -62,7 +62,7 @@ class CAMT054(SEPAHandler): # Version 1 doesn't have NtryDtls but directly TxDtls details = element.find('./{%s}TxDtls' % tag.namespace) if details is None: - return + return [] instr_id = details.find('.//{%s}InstrId' % tag.namespace) if instr_id is not None: payments = self.Payment.search([