From 081bbb45be3255500c6946756c3276754eb0f5ee Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Tue, 21 Dec 2021 21:45:55 +0100 Subject: [PATCH] feat(api): fix forget password --- ee/api/chalicelib/core/reset_password.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ee/api/chalicelib/core/reset_password.py b/ee/api/chalicelib/core/reset_password.py index d09db8c50..194c37704 100644 --- a/ee/api/chalicelib/core/reset_password.py +++ b/ee/api/chalicelib/core/reset_password.py @@ -9,8 +9,6 @@ def reset(data: schemas.ForgetPasswordPayloadSchema): if helper.allow_captcha() and not captcha.is_valid(data.g_recaptcha_response): print("error: Invalid captcha.") return {"errors": ["Invalid captcha."]} - if "email" not in data: - return {"errors": ["email not found in body"]} if not helper.has_smtp(): return {"errors": ["no SMTP configuration found, you can ask your admin to reset your password"]} a_user = users.get_by_email_only(data.email)