Open
Description
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.