limit query
This commit is contained in:
parent
ce9ea61da5
commit
b7179e7cfc
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue