Closed superseby2 closed 2 years ago
@superseby2 This should be fixed in Appwrite 0.13.4, the latest version. Let us know if you still have the problem.
As far as I can tell, the bug is still here.
Python SDK use True
and apprwrite is expecting true
Here is the query as output by Python SDK
documents?queries%5B0%5D=calendar_done.equal%28True%29&limit=100
which won't work
but this will work :
documents?queries%5B0%5D=calendar_done.equal%28true%29&limit=100
Seems to me more of an sdk issue. Still need to apply my patch to make this work though.
Has this ever been fixed ? I still have the issue on version v:0.15.3.402 Is there a workaround ? Thank you.
@netapy, not yet. The workaround is to manually generate the query string. So instead of Query.equal("attr", True)
, do "attr.equal(true)"
.
@netapy if for some reason you cannot query using the "true" vs "True" trick. What I do is simply not use a boolean field but an int field and query using 0 or 1 ...
@superseby2 thanks for the input. I have found the workaround suggested by @stnguyen90 to work very well for my case !
@abnegate has just merged a fixed, this is expected to be available with the next release of the SDK later this week.
Happy to see this fixed :)
This fix is now released in version 1.0.0
:grin:
👟 Reproduction steps
Trying to perform a query like so :
👍 Expected behavior
👎 Actual Behavior
Error "Query type does not match expected: boolean" is raised.
It looks like the Python SDK just pass the value as "True" in the rest api call
https://domain.com/v1/database/collections/profiles/documents?queries%5B0%5D=open.equal%28True%29
converting the value to lowercase will make the query works
Bellow is the part that would probably need some love
maybe something like ?
🎲 Appwrite version
Version 0.12.x
💻 Operating system
Linux
🧱 Your Environment
No response
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?