Fix `NoneType` return type for 204 endpoints

This commit is contained in:
matiuszka 2023-01-09 11:39:07 +01:00
parent 69bd7d8501
commit 151bf3e3dc
1 changed files with 6 additions and 1 deletions

View File

@ -276,7 +276,12 @@ def get_typed_return_annotation(call: Callable[..., Any]) -> Any:
return None
globalns = getattr(call, "__globals__", {})
return get_typed_annotation(annotation, globalns)
typed_annotation = get_typed_annotation(annotation, globalns)
if typed_annotation is type(None):
return None
return typed_annotation
def get_dependant(