Commit 92990efe authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Romain Bignon

[cragr/regions] Update missing session_value after login

For some connections, the session_value is still None after the login so
we must set it before calling iter_accounts otherwise nothing will work.

Closes: 12355@zendesk
parent 4cc2b143
......@@ -273,6 +273,14 @@ class CragrRegion(LoginBrowser):
- Multiple perimeters: visit all perimeters one by one and return all accounts.
accounts_list = []
# Sometimes the URL of the page after login has a session_value=None,
# so we must set it correctly otherwise the next requests will crash.
if not self.session_value:
m ='sessionSAG=([^&]+)', self.url)
if m:
self.session_value =
if len(self.perimeters) == 1:
for account in self.iter_perimeter_accounts(iban=True, all_accounts=True):
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