This repository was archived by the owner on Jun 21, 2025. It is now read-only.

Description
One of my models has Enum fields in it, which can't seem to be currently handled and throw a type error.
Here is my simplified example:
class SomeType(enum.Enum):
Interval = 'interval'
class SomeModel(Model):
_primary_key_field: str = 'id'
id: str
type: SomeType
Error message:
File "/home/.../.local/lib/python3.9/site-packages/pydantic_aioredis/abstract.py", line 80, in json_default
raise TypeError("Type %s not serializable" % type(obj))
TypeError: Type <enum 'SomeType'> not serializable