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
- Custom API domain is unreachable
Earlier my custom api domain was working fine. Now it seems to be offline without a trace a few hours later. I didn't change anything, all the relevant DNS reco...
- "Invalid console fingerprint" when unpau...
I've tried logging out and logging back in, still can't figure out why this is happening.
- Inviting members while SMTP is disabled ...
Issue: https://github.com/appwrite/console/issues/3125 PR: https://github.com/appwrite/console/pull/3126