Merge lp:~therp-nl/banking-addons/ba70-camt_ignore_empty_statements into lp:banking-addons

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 249
Proposed branch: lp:~therp-nl/banking-addons/ba70-camt_ignore_empty_statements
Merge into: lp:banking-addons
Diff against target: 12 lines (+3/-1)
1 file modified
account_banking_camt/camt.py (+3/-1)
To merge this branch: bzr merge lp:~therp-nl/banking-addons/ba70-camt_ignore_empty_statements
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) code review Approve
Pedro Manuel Baeza code review Approve
Review via email: mp+212843@code.launchpad.net

Description of the change

Ignore empty statements in CAMT.053 parser. Empty statements are harmful because they don't have a statement date yet and cause problems later on.

To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

LGTM

review: Approve (code review)
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_banking_camt/camt.py'
2--- account_banking_camt/camt.py 2014-03-20 11:03:58 +0000
3+++ account_banking_camt/camt.py 2014-03-26 13:23:01 +0000
4@@ -274,5 +274,7 @@
5 self.assert_tag(root[0][0], 'GrpHdr')
6 statements = []
7 for node in root[0][1:]:
8- statements.append(self.parse_Stmt(cr, node))
9+ statement = self.parse_Stmt(cr, node)
10+ if len(statement.transactions):
11+ statements.append(statement)
12 return statements

Subscribers

People subscribed via source and target branches

to status/vote changes: