1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-23 14:59:36 +02:00

fix: update request data handling in AdventureImageViewSet and improve error handling in RecommendationsViewSet

This commit is contained in:
Sean Morley 2025-06-05 14:53:08 -04:00
parent 9d817a5ce9
commit ebee6f52e8
3 changed files with 17 additions and 16 deletions

View file

@ -108,6 +108,7 @@ class AdventureImageViewSet(viewsets.ModelViewSet):
# Modify request data to use the downloaded image instead of immich_id
request_data = request.data.copy()
request_data.pop('immich_id', None) # Remove immich_id
request_data['image'] = image_file # Add the image file
# Create the serializer with the modified data
serializer = self.get_serializer(data=request_data)