Commit b51cc6e5 authored by Guillaume Risbourg's avatar Guillaume Risbourg Committed by Vincent A

[lcl] Changed profile name retrieval for account ownership

For some accounts, the profile is unavailable. This lead to the
iter_accounts not working because the account ownership crashed on the
get_profile. The name of the person can be retrieved on the accounts page,
so there is now a new function to retrieve only the profile name.

Closes: 51219@sibi
parent 0032eeb0
......@@ -271,7 +271,7 @@ class LCLBrowser(LoginBrowser, StatesMixin):
if self.login.is_here():
return self.get_accounts_list()
owner_name =' (.+)', self.get_profile().name).group(1).upper()
owner_name =' (.+)', self.get_profile_name()).group(1).upper()
# retrieve life insurance accounts
if self.no_perm.is_here():
......@@ -394,7 +394,7 @@ class LCLBrowser(LoginBrowser, StatesMixin):
a._card_position = card_position
owner_name =' (.+)', self.get_profile().name).group(1).upper()
owner_name =' (.+)', self.get_profile_name()).group(1).upper()
for account in self.accounts_list:
account.owner_type = self.owner_type
self.set_ownership(account, owner_name)
......@@ -641,10 +641,15 @@ class LCLBrowser(LoginBrowser, StatesMixin):
return documents
def get_profile_name(self):
def get_profile(self):
name =
name = self.get_profile_name()
# The self.get_profile_name() already does a
# self.accounts.stay_or_go()
profile =
return profile
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