Commit 1bca3c79 authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Romain Bignon

[cragr] Avoid crash when redirection to Predica for old website

Sometimes during the iter_history on the old Crédit Agricole website, we
get this immediate: "AttributeError: 'PredicaRedirectPage' object has no attribute 'order_transactions'"
This occurs when we try to call order_transactions whereas we are on the
Predica space, which we don't handle yet. Since all regions will switch
to the new website soon we will not build transactions for the Predica
space from the old website.

Closes: 13242@sibi
parent 44effc5b
......@@ -460,6 +460,9 @@ class Cragr(LoginBrowser, StatesMixin):
date_guesser = LinearDateGuesser(date_max_bump=timedelta(2))
else:
date_guesser = LinearDateGuesser()
if self.predica_redirect.is_here():
self.logger.warning('Predica transactions are not handled.')
return
self.page.order_transactions()
while True:
assert self.transactions.is_here()
......
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