
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:
TypeScript
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.
TL;DR
Developers are encountering a `Server Error` when attempting to update a database document's many-to-many association with Python SDK. The issue likely lies in providing the correct type of data (ID versus object) for the association. Double-check the data format being passed in the update operation and ensure permissions are set correctly for all related content.Recommended threads
- Subroute returns 'not found' on Solid + ...
Hey, im deploying a simple spa to sites, but when calling to subroute it returns not found. The dist folder seams fine, whit index.html and js assets. Im using ...
- Realtime not working in EAS Update
Hello, my realtime isnt working in ‘eas update’, but works locally.. is this an issue on my side?
- Is wildcard subdomains supported on Appw...
I am trying to add `*.sub.mydomain.com` as a custom domain to Appwrite but it shows this error. So I just wanted to check if it is possible. I want the functi...
