Skip to content

Commit e96011d

Browse files
perf: User email format msg
1 parent 8c624fb commit e96011d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/apps/system/api/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ async def update(session: SessionDep, editor: UserEditor, trans: Trans):
153153
raise Exception(f"User with id [{editor.id}] not found!")
154154
if editor.account != user_model.account:
155155
raise Exception(f"account cannot be changed!")
156-
if editor.email != user_model.email and check_email_exists(session=session, account=editor.email):
156+
if editor.email != user_model.email and check_email_exists(session=session, email=editor.email):
157157
raise Exception(trans('i18n_exist', msg = f"{trans('i18n_user.email')} [{editor.email}]"))
158158
if not check_email_format(editor.email):
159159
raise Exception(trans('i18n_format_invalid', key = f"{trans('i18n_user.email')} [{editor.email}]"))

0 commit comments

Comments
 (0)