fix ruff liner

pull/22900/head
Yansong Zhang 7 months ago
parent a1de4fa428
commit c271c65c85

@ -114,7 +114,8 @@ class MemberNotInTenantError(BaseHTTPException):
description = "The member is not in the workspace."
code = 400
class AccountInFreezeError(BaseHTTPException):
error_code = "account_in_freeze"
description = "This email is temporarily unavailable."
code = 400
code = 400

@ -485,15 +485,13 @@ class ChangeEmailResetApi(Resource):
if not AccountService.check_email_unique(args["new_email"]):
raise EmailAlreadyInUseError()
reset_data = AccountService.get_change_email_data(args["token"])
if not reset_data:
raise InvalidTokenError()
AccountService.revoke_change_email_token(args["token"])
old_email = reset_data.get("old_email", "")
if current_user.email != old_email:
raise AccountNotFound()

Loading…
Cancel
Save