Commit c0eccec4 authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Romain Bignon

[cragr] Use go_to_account_space() for get_profile and advisor

We are quite often logged out when trying to switch from one space ot
the other. The go_to_accounts_space() already takes this in
consideration and tries to relogin when it happens, so we should use
this method in get_profile and advisor in order to avoid being
disconnected and not handling it.

Closes: 36099@sibi
parent 757e1afd
......@@ -473,7 +473,7 @@ class CragrAPI(LoginBrowser):
@need_login
def iter_advisor(self):
self.contracts_page.go(id_contract=0)
self.go_to_account_space(0)
owner_type = self.page.get_owner_type()
self.profile_page.go()
if owner_type == 'PRIV':
......@@ -490,7 +490,7 @@ class CragrAPI(LoginBrowser):
@need_login
def get_profile(self):
# There is one profile per space, so we only fetch the first one
self.contracts_page.go(id_contract=0)
self.go_to_account_space(0)
owner_type = self.page.get_owner_type()
self.profile_page.go()
if owner_type == 'PRIV':
......
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