Skip to content

Commit

Permalink
Bugfix the pydantic dataclass check
Browse files Browse the repository at this point in the history
It should check the type not the instance.
  • Loading branch information
pgjones committed Feb 15, 2024
1 parent aa43995 commit 21ce379
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/quart_schema/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 21ce379

Please sign in to comment.