From 6429662e5546540b3cafe1068d784169c7ef7667 Mon Sep 17 00:00:00 2001 From: Florent Date: Tue, 9 Sep 2014 12:28:12 +0200 Subject: [PATCH] Add unique id to creditcooperatif (perso) --- modules/creditcooperatif/perso/pages.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/creditcooperatif/perso/pages.py b/modules/creditcooperatif/perso/pages.py index 0fadd383..e5d870b5 100644 --- a/modules/creditcooperatif/perso/pages.py +++ b/modules/creditcooperatif/perso/pages.py @@ -103,10 +103,12 @@ class TransactionsJSONPage(BasePage): ROW_DEBIT = -2 def get_transactions(self): + seen = set() for tr in self.document['exportData'][1:]: t = Transaction(0) t.parse(tr[self.ROW_DATE], tr[self.ROW_TEXT]) t.set_amount(tr[self.ROW_CREDIT], tr[self.ROW_DEBIT]) + t.id = t.unique_id(seen) yield t