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
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...
- custom domain with CloudFlare
Hi all, it seems that CloudFlare has blocked cross-domain CNAME link which made my app hostname which is in CloudFlare, unable to create a CNAME pointing to clo...
- Custom emails
What happen if I use a third party email provider to customize my emails and my plan run out of emails/month? Appwrite emails are used as fallback sending emai...