I’m not quite clear on what you’re doing here?
The database ID is the first parameter to the database.createDocument()
or database.updateDocument()
method
i have these that appwrite adds when getting the data
What is this?
data that im getting from appwrite
So where’s the error?
What’s the code that’s triggering that error?
this one
Wait, that error is coming back when calling databases.listDocuments()
? Not when creating/updating a Document?
oh wait
sorry th
the first picture wasn't sent
mb
And what’s in newtag
?
{ monday: 'm', tuesday: 'azd', wednesday: 'w', thursday: 't', friday: 'f', saturday: 's', sunday: 's', user: '65e760c118cde1ce4ebf', '$id': '661e594110cd04682356', '$createdAt': '2024-04-16T10:56:01.071+00:00', '$updatedAt': '2024-04-16T14:37:08.599+00:00', '$permissions': [], '$databaseId': '65ce3bba5179ce91f4ae', '$collectionId': '65d5ded409a3fc3353db' }
Ah - so there’s your issue - all the Attributes beginning with $
are system Attributes which can’t be set.
yess exactly
So you’ll need to remove them from newtag
before passing it in to databases.updateDocument()
yes i did that but thought if it was system attributes why wouldn't the update ignore it in the first plcae then
thought i was doing something wrong
Yeah, I would expect it should, too.
Recommended threads
- self-hosted auth: /v1/account 404 on saf...
Project created in React/Next.js, Appwrite version 1.6.0. Authentication works in all browsers except Safari (ios), where an attempt to connect to {endpoint}/v1...
- delete document problems
i don't know what's going on but i get an attribute "tournamentid" not found in the collection when i try to delet the document... but this is just the document...
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...