From 53aac26aad1b51eb755de0e727b086791c76cfae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Sat, 20 Dec 2025 13:24:13 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Remove=20conditional=20that=20wo?= =?UTF-8?q?uld=20only=20apply=20on=20Pydantic=20v1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/routing.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/fastapi/routing.py b/fastapi/routing.py index 142286d55..05e9b0bc1 100644 --- a/fastapi/routing.py +++ b/fastapi/routing.py @@ -188,9 +188,6 @@ def _prepare_response_content( ) for k, v in res.items() } - elif dataclasses.is_dataclass(res): - assert not isinstance(res, type) - return dataclasses.asdict(res) return res