From 7a645688dfeeffc2e9b32f506aaf7382a1d6e2f0 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Tue, 21 Dec 2021 21:36:12 +0100 Subject: [PATCH] feat(api): fix forgot password --- api/chalicelib/core/reset_password.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/api/chalicelib/core/reset_password.py b/api/chalicelib/core/reset_password.py index 1c32cdddb..1baaf82d8 100644 --- a/api/chalicelib/core/reset_password.py +++ b/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_users = users.get_by_email_only(data.email)