From 865395abba7385d6a4f141c07940715c82c874da Mon Sep 17 00:00:00 2001 From: Joe <1264204425@qq.com> Date: Fri, 30 Aug 2024 12:36:22 +0800 Subject: [PATCH] fix: send_reset_password_email limit email error --- api/services/account_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/services/account_service.py b/api/services/account_service.py index b1912a6e70..ecf959eb4b 100644 --- a/api/services/account_service.py +++ b/api/services/account_service.py @@ -253,7 +253,7 @@ class AccountService: account_email = account.email if account else email account_language = account.interface_language if account else languages[0] - if cls.reset_password_rate_limiter.is_rate_limited(account.email): + if cls.reset_password_rate_limiter.is_rate_limited(account_email): raise RateLimitExceededError(f"Rate limit exceeded for email: {account_email}. Please try again later.") code = "".join([str(random.randint(0, 9)) for _ in range(6)])