Fix issue 330: FastAPI Depends directive does not work after patching with @inject

This commit is contained in:
Roman Mogylatov 2020-12-04 20:11:21 -05:00
parent 5c4c84b34e
commit afa39b148e

View File

@ -336,6 +336,9 @@ def _fetch_reference_injections(
if _is_fastapi_depends(marker):
marker = marker.dependency
if not isinstance(marker, providers.Provider):
continue
if isinstance(marker, Closing):
marker = marker.provider
closing[parameter_name] = marker