From 9aeb7c67ed42923d6d6425b8165752814310148c Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sat, 27 Oct 2012 12:50:14 +0200 Subject: [PATCH] never store 'RELEVE CARTE' --- modules/cic/browser.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/cic/browser.py b/modules/cic/browser.py index 9824a215..d21d5882 100644 --- a/modules/cic/browser.py +++ b/modules/cic/browser.py @@ -116,10 +116,12 @@ class CICBrowser(BaseBrowser): transactions = [] last_debit = None for tr in self.list_operations(account._link_id): - if tr.raw == 'RELEVE CARTE' and last_debit is None: - last_debit = (tr.date - timedelta(days=10)).month - else: + # to prevent redundancy with card transactions, we do not + # store 'RELEVE CARTE' transaction. + if tr.raw != 'RELEVE CARTE': transactions.append(tr) + elif last_debit is None: + last_debit = (tr.date - timedelta(days=10)).month month = 0 for card_link in account._card_links: