From 90dd150a1f35b6d88322304b9d9ba97f5f788c01 Mon Sep 17 00:00:00 2001 From: "matthias@matsewe.de" Date: Thu, 6 Jun 2024 16:37:23 +0200 Subject: [PATCH] fix initial run --- app/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index ac060c3..4ade2ab 100644 --- a/app/main.py +++ b/app/main.py @@ -17,7 +17,7 @@ from starlette.middleware import Middleware from starlette_context import context, plugins from starlette_context.middleware import RawContextMiddleware -if os.path.isfile("first_run") and os.environ.get("RELOAD_ON_FIRST_RUN"): +if os.path.isfile("first_run") and (os.environ.get("RELOAD_ON_FIRST_RUN").lower() == "true"): print("First run ... load data") with SessionLocal() as db: asyncio.run(admin.create_upload_file(include_non_singable=True, db=db))