Skip to content

Commit

Permalink
Merge pull request #314 from reagento/fix/aiohttp_autoinject
Browse files Browse the repository at this point in the history
Fix auiinject failed on latest aiohttp
  • Loading branch information
Tishka17 authored Nov 23, 2024
2 parents 9a90334 + fdda0f4 commit 3ca5219
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/dishka/integrations/aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ def _inject_routes(router: web.UrlDispatcher) -> None:
_inject_route(route)

for resource in router.resources():
for route in resource._routes: # type: ignore[attr-defined] # noqa: SLF001
try:
routes = iter(resource)
except TypeError:
continue
for route in routes:
_inject_route(route)


Expand Down

0 comments on commit 3ca5219

Please sign in to comment.