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:
parent
9d817a5ce9
commit
ebee6f52e8
3 changed files with 17 additions and 16 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue