fix(api): lifespan param named _app without dishka
This commit is contained in:
1 parent
7874399cd7
commit
ba348a35b7
1 file changed
+1
-1
+1
-1
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user