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
This commit is contained in:
Cédric Krier
2017-03-29 22:30:54 +02:00
parent 39cfa7fee5
commit b105eb0097
+1 -1
View File
@@ -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([