Commit 63ef6b95 authored by Martin Sicot's avatar Martin Sicot Committed by Romain Bignon

[lcl] Fix unavailable RIB for users

Some users do not have acces to their RIB. Fixed it by checking if we
land on 'NoPermission' page before trying to retrieve it.
parent 213ac200
......@@ -229,7 +229,9 @@ class LCLBrowser(LoginBrowser, StatesMixin):
continue
self.location('/outil/UWRI/Accueil/')
if self.page.has_iban_choice():
if self.no_perm.is_here():
self.logger.warning('RIB is unavailable.')
elif self.page.has_iban_choice():
self.rib.go(data={'compte': '%s/%s/%s' % (a.id[0:5], a.id[5:11], a.id[11:])})
if self.rib.is_here():
iban = self.page.get_iban()
......
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