Commit 1a60bc5a authored by Jerome Berthier's avatar Jerome Berthier Committed by Romain Bignon

[themisbanque] Fix duplicated transactions

parent aa7344b3
......@@ -61,8 +61,19 @@ class ThemisBrowser(LoginBrowser):
def get_history(self, account):
if account._link:
return []
for tr in self._dedup_transactions(
yield tr
def _dedup_transactions(transactions):
# Sometime the website returns the same list of transactions for each history page.
# So we process the transactions list, and stop if any transaction is newer than the previous one.
last_date = None
for i, tr in enumerate(transactions):
if last_date and > last_date:
last_date =
yield tr
def get_profile(self):
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