diff --git a/src/main.py b/src/main.py index 4581a03..bd4a390 100644 --- a/src/main.py +++ b/src/main.py @@ -53,7 +53,7 @@ async def lifespan(_app: FastAPI): generate_schemas=True, add_exception_handlers=True, ): - if not await db.Account.all().count(): + if not (await db.Account.get_or_none(username="admin")): generated_password = secrets.token_hex(16) _d = await db.Account.create( username="admin",