redis-om-python
redis-om-python copied to clipboard
Missing support for boolean field or examples of how to do it
I have a model like
MyModel(HashModel): local_auth: bool
When initing or saving I get:
DataError("Invalid input of type: 'bool'. Convert to a bytes, string, int or float first.")
Hi there - boolean fields aren't yet supported for JSON or Hash, they'll likely appear in JSON first as boolean is a native type there vs a Redis Hash that understands strings, floats and ints.
I'm talking to the maintainers of the other Redis OM Clients for different languages to make sure that when we do add booleans to Python there's a common approach where possible.
@simonprickett , any update on native support for boolean fields?
@jrwagz I don't have an update here, copying in @dvora-h