comment
This commit is contained in:
parent
dbbe7a8c35
commit
567b863742
1 changed files with 1 additions and 0 deletions
|
@ -57,6 +57,7 @@ async def create_initial_admin(
|
|||
if current_config is None:
|
||||
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
# fail if any user exists
|
||||
with Connection.session as db:
|
||||
if db.exec(select(User).limit(1)).first() is not None:
|
||||
raise HTTPException(status_code=status.HTTP_409_CONFLICT)
|
||||
|
|
Loading…
Reference in a new issue