diff --git a/services/auth_services.py b/services/auth_services.py index 20b23157b5bd8d7ece3c1ac2536f1db13d6c80a1..618edcd8bc788e0dcd07b9259fe855a7812e1402 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)