Commit b3c12847 authored by Christophe Francois's avatar Christophe Francois Committed by Vincent A

[creditcooperatif] Fetch history of savings accounts in CenetBrowser

The call fails on caissedepargne for savings accounts but it works fine
on creditcooperatif.
parent ef57877e
......@@ -191,9 +191,12 @@ class CenetBrowser(LoginBrowser, StatesMixin):
def _matches_card(self, tr, full_id):
return fnmatch(full_id, tr.card)
def has_no_history(self, account):
return account.type in (account.TYPE_LOAN, account.TYPE_SAVINGS)
@need_login
def get_history(self, account):
if account.type in (account.TYPE_LOAN, account.TYPE_SAVINGS):
if self.has_no_history(account):
return []
if account.type == account.TYPE_CARD:
......
......@@ -18,6 +18,7 @@
# along with this weboob module. If not, see <http://www.gnu.org/licenses/>.
from weboob.browser import AbstractBrowser
from weboob.capabilities.bank import Account
__all__ = ['CenetBrowser']
......@@ -31,3 +32,6 @@ class CenetBrowser(AbstractBrowser):
def __init__(self, nuser, *args, **kwargs):
kwargs['domain'] = 'www.credit-cooperatif.coop'
super(CenetBrowser, self).__init__(nuser, *args, **kwargs)
def has_no_history(self, account):
return account.type == Account.TYPE_LOAN
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment