Skip to content

Commit

Permalink
fixing broken Pydantic v1 regression (#663)
Browse files Browse the repository at this point in the history
* fixing broken Pydantic v1 regression

* mypy thing
  • Loading branch information
slorello89 authored Oct 30, 2024
1 parent c5068e5 commit 2455394
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aredis_om/model/encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def jsonable_encoder(
sqlalchemy_safe=sqlalchemy_safe,
)
if dataclasses.is_dataclass(obj):
return dataclasses.asdict(obj) # type: ignore[call-overload]
return dataclasses.asdict(obj) # type: ignore
if isinstance(obj, Enum):
return obj.value
if isinstance(obj, PurePath):
Expand Down
3 changes: 2 additions & 1 deletion aredis_om/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,8 @@ def outer_type_or_annotation(field):

class RedisModel(BaseModel, abc.ABC, metaclass=ModelMeta):
pk: Optional[str] = Field(default=None, primary_key=True)
ConfigDict: ClassVar
if PYDANTIC_V2:
ConfigDict: ClassVar

Meta = DefaultMeta

Expand Down

0 comments on commit 2455394

Please sign in to comment.