Skip to content

Commit b863854

Browse files
authored
Fix: type-checking
1 parent f936785 commit b863854

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/core/users/endpoints_users.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,8 @@ async def reset_password(
644644
)
645645

646646
user = await cruds_users.get_user_by_id(db=db, user_id=recover_request.user_id)
647+
if user is None:
648+
raise HTTPException("Invalid user ID")
647649
if user.should_change_password:
648650
# we control whether we check if the new password is different
649651
if security.verify_password(

0 commit comments

Comments
 (0)