nonexistent user deletion
This commit is contained in:
parent
70df7a47db
commit
fba1bf6514
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ async def remove_user(
|
||||||
)
|
)
|
||||||
|
|
||||||
# fail if deletion was unsuccessful
|
# fail if deletion was unsuccessful
|
||||||
if not user.delete(db):
|
if user is None or not user.delete(db):
|
||||||
raise HTTPException(status_code=status.HTTP_409_CONFLICT)
|
raise HTTPException(status_code=status.HTTP_409_CONFLICT)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue