Commit b148d2c6 authored by Maxime Gasselin's avatar Maxime Gasselin Committed by Vincent A

[banquepopulaire] Allows Non numeric password for new login

We still have some connexions without VK. Consequently the numeric check
is done when the vk is identified.
parent a240f4f1
......@@ -264,10 +264,8 @@ class BanquePopulaire(LoginBrowser):
return
if self.new_login.is_here():
if not self.password.isnumeric():
# Vk from new login only accepts numeric characters
raise BrowserIncorrectPassword('Le mot de passe doit être composé de chiffres uniquement')
return self.do_new_login()
return self.do_old_login()
def do_old_login(self):
......@@ -396,6 +394,9 @@ class BanquePopulaire(LoginBrowser):
# no VK, password to submit
code = self.password
else:
if not self.password.isnumeric():
raise BrowserIncorrectPassword('Le mot de passe doit être composé de chiffres uniquement')
vk_images_url = vk_info['virtualKeyboard']['externalRestMediaApiUrl']
self.location(vk_images_url)
......
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