Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ class Meta:
class BaseReportWithPhotosSerializer(BaseReportSerializer):
photos = SimplePhotoSerializer(required=True, many=True)

@transaction.atomic
Copy link

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The transaction module needs to be imported. Add from django.db import transaction at the top of the file to use the @transaction.atomic decorator.

Copilot uses AI. Check for mistakes.
def create(self, validated_data):
photos = validated_data.pop("photos", [])

Expand Down