diff --git a/api/kiwi_vpn_api/routers/admin.py b/api/kiwi_vpn_api/routers/admin.py index ce03583..99dfdeb 100644 --- a/api/kiwi_vpn_api/routers/admin.py +++ b/api/kiwi_vpn_api/routers/admin.py @@ -58,7 +58,7 @@ async def create_initial_admin( raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST) with Connection.session as db: - if db.exec(select(User)).first() is not None: + if db.exec(select(User).limit(1)).first() is not None: raise HTTPException(status_code=status.HTTP_409_CONFLICT) # create an administrative user