From 366a4af7dd065486a6a4609c6508d75e3210f36f Mon Sep 17 00:00:00 2001 From: Ronald Portier Date: Wed, 13 Nov 2024 10:36:11 +0100 Subject: [PATCH] [FIX] auth_sms_auth_signup: prevent error in exception handling --- auth_sms_auth_signup/controllers/auth_sms_auth_signup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth_sms_auth_signup/controllers/auth_sms_auth_signup.py b/auth_sms_auth_signup/controllers/auth_sms_auth_signup.py index d63efe60b..6158bcbbc 100644 --- a/auth_sms_auth_signup/controllers/auth_sms_auth_signup.py +++ b/auth_sms_auth_signup/controllers/auth_sms_auth_signup.py @@ -32,7 +32,7 @@ def web_auth_reset_password(self, *args, **kw): user.sudo(user)._auth_sms_check_credentials() except Exception as e: del request.session["auth_sms.code"] - qcontext["error"] = e.message or e + qcontext["error"] = e.message if hasattr(e, "message") else str(e) if request.session.get("auth_sms.code"): return super(AuthSmsAuthSignup, self).web_auth_reset_password( *args, **kw