From 3c4c982139a96b75bf0afd9b585659ea9d3b3b4d Mon Sep 17 00:00:00 2001 From: Juliana <juliana@le-filament.com> Date: Thu, 31 Aug 2023 11:20:45 +0200 Subject: [PATCH] [FIX]Error when pasword is empty --- services/auth_services.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/services/auth_services.py b/services/auth_services.py index 20b2315..618edcd 100644 --- a/services/auth_services.py +++ b/services/auth_services.py @@ -238,7 +238,12 @@ class AuthService(Component): "userCompany": u.parent_id.name if u.parent_id else None, } )[0] - if password == confirm_password: + if not password: + datas[ + "error" + ] = "Veuillez remplir le mot de passe." + datas["user"] = user_datas + elif password == confirm_password: jwt_validator = self.env.ref("acc_rest_api.elo_validator").sudo() exp = datetime.now() + timedelta( hours=(jwt_validator.token_expiration * 24) -- GitLab