From 21ce37937a41d4145c28b14c7daeece99025337d Mon Sep 17 00:00:00 2001 From: pgjones Date: Thu, 15 Feb 2024 20:36:11 +0000 Subject: [PATCH] Bugfix the pydantic dataclass check It should check the type not the instance. --- src/quart_schema/conversion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quart_schema/conversion.py b/src/quart_schema/conversion.py index 47bc0a7..51b7262 100644 --- a/src/quart_schema/conversion.py +++ b/src/quart_schema/conversion.py @@ -130,7 +130,7 @@ def model_dump( kebabize: bool = False, preference: Optional[str] = None, ) -> dict | list: - if is_pydantic_dataclass(raw): # type: ignore + if is_pydantic_dataclass(type(raw)): value = RootModel[type(raw)](raw).model_dump() # type: ignore elif isinstance(raw, BaseModel): value = raw.model_dump(by_alias=by_alias)