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
from typing import Optional
from redis_om import HashModel
class TestObject(HashModel):
name: str
age: int
weight: Optional[float] = None
obj = TestObject(name="Joe", age=20, weight=None)
obj.save()
TestObject.get(obj.pk)
# pydantic.error_wrappers.ValidationError: 1 validation error for TestObject
# weight
# value is not a valid float (type=type_error.float)
If was able to write it I should be able to read it.