Skip to content

Commit 21b3c56

Browse files
committed
Showing photo.uuid instead of photo.id in report endpoint
1 parent eac68b3 commit 21b3c56

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

api/serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ class ReportPhotoSerializer(serializers.ModelSerializer):
295295

296296
class Meta:
297297
model = Photo
298-
fields = ("id", "url", "file")
298+
fields = ("uuid", "url", "file")
299299

300300

301301
class BaseReportSerializer(serializers.ModelSerializer):

api/tests/integration/reports/create.tavern.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@ stages:
182182
user_perceived_mosquito_abdomen: null
183183
user_perceived_mosquito_legs: null
184184
photos:
185-
- id: !anyint
185+
- uuid: !anystr
186186
url: !anystr
187-
- id: !anyint
187+
- uuid: !anystr
188188
url: !anystr
189189
- name: Create adult report without photos
190190
request:
@@ -278,7 +278,7 @@ stages:
278278
breeding_site_has_near_mosquitoes: null
279279
breeding_site_has_larvae: null
280280
photos:
281-
- id: !anyint
281+
- uuid: !anystr
282282
url: !anystr
283-
- id: !anyint
283+
- uuid: !anystr
284284
url: !anystr

0 commit comments

Comments
 (0)