We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55245e1 commit 03eb49aCopy full SHA for 03eb49a
1 file changed
backend/app/api/routes/users.py
@@ -82,7 +82,7 @@ def update_user_me(
82
83
if user_in.email:
84
existing_user = crud.get_user_by_email(session=session, email=user_in.email)
85
- if existing_user:
+ if existing_user and existing_user.id != current_user.id:
86
raise HTTPException(
87
status_code=409, detail="User with this email already exists"
88
)
@@ -184,7 +184,7 @@ def update_user(
184
185
186
187
+ if existing_user and existing_user.id != user_id:
188
189
190
0 commit comments