diff --git a/api/kiwi_vpn_api/routers/user.py b/api/kiwi_vpn_api/routers/user.py index 66dcd7e..935f066 100644 --- a/api/kiwi_vpn_api/routers/user.py +++ b/api/kiwi_vpn_api/routers/user.py @@ -131,7 +131,7 @@ async def remove_user( ) # 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)