Fix startup gen
All checks were successful
Build and Publish / build_and_publish (push) Successful in 27s
All checks were successful
Build and Publish / build_and_publish (push) Successful in 27s
This commit is contained in:
parent
930bff7aa1
commit
05f39a0a9f
1 changed files with 1 additions and 1 deletions
|
@ -53,7 +53,7 @@ async def lifespan(_app: FastAPI):
|
||||||
generate_schemas=True,
|
generate_schemas=True,
|
||||||
add_exception_handlers=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)
|
generated_password = secrets.token_hex(16)
|
||||||
_d = await db.Account.create(
|
_d = await db.Account.create(
|
||||||
username="admin",
|
username="admin",
|
||||||
|
|
Loading…
Reference in a new issue