From b013b737f143b38a16a922371f55cd5aa9ab3fd2 Mon Sep 17 00:00:00 2001 From: Stefan Rijnhart Date: Fri, 11 Oct 2013 14:18:28 +0200 Subject: [PATCH] [IMP] Take EndToEndId into account when no structured reference --- account_banking_camt/camt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/account_banking_camt/camt.py b/account_banking_camt/camt.py index 7384a036b..2ec31439f 100644 --- a/account_banking_camt/camt.py +++ b/account_banking_camt/camt.py @@ -239,6 +239,8 @@ CAMT Format parser vals['message'] = ' '.join([x.text for x in unstructured]) structured = self.find( TxDtls, './ns:RmtInf/ns:Strd/ns:CdtrRefInf/ns:Ref') + if structured is None or not structured.text: + structured = self.find(TxDtls, './ns:Refs/ns:EndToEndId') if structured is not None: vals['reference'] = structured.text else: