I'm trying to update an existing database document's many-to-many assocation via a function but keep getting a Server Error whenever I attempt this code:
def associate_video_to_playlist(playlist_url, video_id):
playlist_document_id = get_appwrite_playlist_document(playlist_url)['$id']
video_document = get_appwrite_youtube_video_document(video_id)
result = documents.update_document(
APPWRITE_DATABASE_ID,
YOUTUBE_PLAYLIST_COLLECTION_ID,
playlist_document_id,
{
'youtubeVideo': video_document
}
)
# print(f'playlist document: {playlist_document["youtubeVideo"]}')
return playlist_document_id
I'm not sure whether to provide the ID of the associated document, the object itself, or what. I've checked permissions for all associated content.
Recommended threads
- SELF HOSTING ISSUE, DATA NOT MIGRATING T...
Hey, devs, I recently tried to migrate my cloud instance to a self hosted version but my data is not transferred fully only the table structure is transferred ...
- AppwriteException - Transaction with the...
I am using "node-appwrite" module and I have successfully created transaction id but when passing it to tablesDB.createRow function with some other required dat...
- unlike any other provider, your sites DN...
your nameservers dont work with a funny little CNAME error, which is a weird bug but thats what you get when you try to be the kitchen sink, funny errors.