From ba348a35b7d92259f844bbf369620035fd5b773a Mon Sep 17 00:00:00 2001 From: h Date: Thu, 15 Oct 2026 14:06:17 +0200 Subject: [PATCH] fix(api): lifespan param named _app without dishka --- .../app.py.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/{{ part_dir }}/src/{% if 'api' in backend_services %}api{% endif %}/app.py.jinja b/template/{{ part_dir }}/src/{% if 'api' in backend_services %}api{% endif %}/app.py.jinja index 2dd6e98..24d11dc 100644 --- a/template/{{ part_dir }}/src/{% if 'api' in backend_services %}api{% endif %}/app.py.jinja +++ b/template/{{ part_dir }}/src/{% if 'api' in backend_services %}api{% endif %}/app.py.jinja @@ -18,7 +18,7 @@ NO_CACHE_HEADERS = {"Cache-Control": "no-cache"} {% endif %} @asynccontextmanager -async def lifespan(app_: FastAPI) -> AsyncGenerator[None]: +async def lifespan({% if use_dishka %}app_{% else %}_app{% endif %}: FastAPI) -> AsyncGenerator[None]: setup_logging() {%- if database != 'none' %} await init_db()