Browse Source

fix optional return type

Signed-off-by: Jan Vollmer <[email protected]>
pull/10589/head
Jan Vollmer 4 months ago
parent
commit
513e943f96
No known key found for this signature in database GPG Key ID: 19473D3A5AB433DA
  1. 2
      fastapi/routing.py

2
fastapi/routing.py

@ -694,7 +694,7 @@ class APIRoute(routing.Route):
return _should_embed_body_fields(self._flat_dependant.body_params)
@cached_property
def body_field(self) -> Optional[ModelField]:
def body_field(self) -> ModelField | None:
return get_body_field(
flat_dependant=self._flat_dependant,
name=self.unique_id,

Loading…
Cancel
Save