Fix save config running before bootstrap for new databases.

This commit is contained in:
2026-02-09 18:07:51 +00:00
parent 0cf551cb28
commit fda9b2545e
2 changed files with 9 additions and 10 deletions
+5 -2
View File
@@ -199,15 +199,16 @@ def main():
startupbox.print_startup_config(config)
# Build config to save (will be saved after bootstrap in async_main)
save_config = None
if args.save:
new_config = Config(
save_config = Config(
rp_id=args.rp_id,
rp_name=args.rp_name,
origins=args.origins,
auth_host=args.auth_host,
listen=args.listen,
)
asyncio.run(set_config(new_config))
run_kwargs: dict = {
"log_level": "warning", # Suppress startup messages; we use custom logging
@@ -230,6 +231,8 @@ def main():
bootstrap=False,
)
await bootstrap_if_needed()
if save_config is not None:
await set_config(save_config)
await flush()
if len(endpoints) > 1: