I am not sure if this is a bug but whenever i try
const notDeletedQuery = Query.equal('deleted', false) databases.getDocument(col.databaseId, col.id, id, [notDeletedQuery])
It is returning undefined but i can clearly see that the document exists in the collection with given id and deleted = false
Am i doing something wrong ?
Just searching the id itself works and returns the proper document but querying with the bool is returning undefined
Appwrite database is secure by default. All documents are invisible to internet. You can mark whole collection or specific document visible by going into it's settings and giving read permission to any.
I am running it locally on my machine and the read permission is set properly.
The issue is only occuring when passing the above query
Aaah. I see. So if you getDocument without queries array, you get the document in return. It's only when you add the query that it wont reutrn your document. Am I right?
yes
Thanks for confirming 🙏 Let me try to reproduce quickly
Are you running latest Appwrite, 1.5.7?
i am on 1.5.6
Hmm I can confirm there seems to be a bug. cc @Jake
As seen on screenshots below, listDocuments work as expected, but getDocument doesnt.
As a quick solution, you could avoid query feature in your request. For example,
let doc = await databases.getDocument(col.databaseId, col.id, id)
if(doc.deleted) {
doc = null;
}
// Rest of your code
hmm, that is what i am doing for now. Thanks for checking it out.
Thanks for reporting this 🙏 We will work on a fix very soon.
Recommended threads
- Paused project can't activate
I have failed to reactivate one my projects which had been paused
- Site deployment keeps getting failed
Hi good folks, need a hand with Sites deploy Error on every deploy: Synchronous function execution timed out... duration doesn't exceed 30 seconds [exact log ...
- Unknown attribute type: varchar / text
Since the `string` type is deprecated I tried using `varchar` and `text` in some newer tables, but when running `appwrite pull tables && appwrite types ./src/li...