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
- Go 1.25 runtime
So I'm trying to use go 1.25 for my functions and I can only find go-1.23 as a function runtime. So I did some searching and found https://github.com/appwrite/a...
- [FEAT REQ] Bun runtime support
Instead of just Nodejs, it would be helpful to also add support for the Bun runtime which can speed up deployments by a ton.
- [ENHANCEMENT] Use the custom Next.js dep...
Deployment adapters on Next.js are now stable! This means that we don't have to stick to the limitations of sniffing out build outputs and manually moving or mo...