From 97f92a72761fa9bc3be85be735cbe04ce9d27233 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Wed, 27 Mar 2013 14:29:23 +0100 Subject: [PATCH] attach cards to the previous account, not to the first one --- modules/creditdunord/pages.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/creditdunord/pages.py b/modules/creditdunord/pages.py index afe33cb1..28170263 100644 --- a/modules/creditdunord/pages.py +++ b/modules/creditdunord/pages.py @@ -110,10 +110,10 @@ class AccountsPage(CDNBasePage): a._args = None if a.id.find('_CarteVisa') >= 0: - accounts[0]._card_ids.append(a._args) - if not accounts[0].coming: - accounts[0].coming = Decimal('0.0') - accounts[0].coming += a.balance + accounts[-1]._card_ids.append(a._args) + if not accounts[-1].coming: + accounts[-1].coming = Decimal('0.0') + accounts[-1].coming += a.balance continue a._card_ids = []