Skip to content

Commit

Permalink
change dependencies order in litestar integration
Browse files Browse the repository at this point in the history
  • Loading branch information
lesnik512 committed Nov 9, 2024
1 parent 0b0e07d commit 791da54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/modern-di-litestar/modern_di_litestar/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@


def setup_di(app: litestar.Litestar, scope: enum.IntEnum = DIScope.APP) -> Container:
app.dependencies["request_di_container"] = Provide(build_di_container)
app.state.di_container = Container(scope=scope)
app.dependencies = {"request_di_container": Provide(build_di_container), **app.dependencies}
return app.state.di_container


Expand Down

0 comments on commit 791da54

Please sign in to comment.