We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b951d4 commit 51bee88Copy full SHA for 51bee88
app/participant_portal_api/serializers/file.py
@@ -18,7 +18,7 @@ def create(self, validated_data: dict) -> PublicFile:
18
new_file = PublicFile(file=validated_data["file"])
19
new_file.clean()
20
21
- if new_file.hash and (pf := PublicFile.objects.filter(hash=new_file.hash).exists()):
+ if new_file.hash and (pf := PublicFile.objects.filter(hash=new_file.hash).first()):
22
return pf
23
24
new_file.save()
0 commit comments