-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boolean values can be stored and fetched if the field type is str
and not bool
using aredis
.
#352
Comments
thanks for you sharing, it is very useful, and I filtered the data in the following way::
|
Great find! @simonprickett this seems also like a documentation issue |
@sav-norem, this isn't documentation issue. In #193 he said:
|
@llirrikk - Sure! I meant more like we can label this as a documentation issue since it provides documentation and isn't raising a new bug type of issue that needs a new PR to fix. |
should be resolved by #611, so going to go ahead and close this out. |
Hey everyone, I am trying to store and fetch in a model whose field's type is boolean. However, as you may know, Redis will complain about that when trying to encode bool values. But, I found a workaround for this use case, take the following as an example using the sync version
redis_om
:Running this above script will throw the following exception:
However, if you are using the async version, storing and indexing will work if the type is
str
. So to make boolean values work inaredis_om
, just replacestr
in place ofbool
:And your endpoints call async functions like the following to create/fetch k/v:
Just wanted to share in case someone might find it helpful.
The text was updated successfully, but these errors were encountered: