Skip to content

Commit 21ce379

Browse files
committed
Bugfix the pydantic dataclass check
It should check the type not the instance.
1 parent aa43995 commit 21ce379

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/quart_schema/conversion.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def model_dump(
130130
kebabize: bool = False,
131131
preference: Optional[str] = None,
132132
) -> dict | list:
133-
if is_pydantic_dataclass(raw): # type: ignore
133+
if is_pydantic_dataclass(type(raw)):
134134
value = RootModel[type(raw)](raw).model_dump() # type: ignore
135135
elif isinstance(raw, BaseModel):
136136
value = raw.model_dump(by_alias=by_alias)

0 commit comments

Comments
 (0)