Skip to content

Commit

Permalink
Merge branch 'refs/heads/feat/new-login' into deploy/dev
Browse files Browse the repository at this point in the history
* refs/heads/feat/new-login:
  fix: send_reset_password_email limit email error
  fix: string error
  • Loading branch information
ZhouhaoJiang committed Aug 30, 2024
2 parents 25167db + 865395a commit 5cc1bcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/services/account_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def send_reset_password_email(cls, account: Optional[Account] = None, email: Opt
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)])
Expand Down

0 comments on commit 5cc1bcb

Please sign in to comment.