You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to add a pydantic v2 model validator to my aredis_om JsonModel, a RecursionError occurs. When testing both aredis_om and the validator separately, both work without error. When testing together a maximum depth search error occurs.
Here is example code that recreates this issue...
from aredis_om import JsonModel
from pydantic import model_validator
class Test(JsonModel):
name: str
@model_validator(mode='after')
async def create_name(self):
self.name = 'this is different'
return self
@classmethod
async def create(cls, name):
test = cls(name=name)
await test.save()
The text was updated successfully, but these errors were encountered:
When trying to add a pydantic v2 model validator to my aredis_om JsonModel, a RecursionError occurs. When testing both aredis_om and the validator separately, both work without error. When testing together a maximum depth search error occurs.
Here is example code that recreates this issue...
The text was updated successfully, but these errors were encountered: