Skip to content

Commit 51bee88

Browse files
committed
fix: 잘못된 메소드 호출 수정
1 parent 4b951d4 commit 51bee88

File tree

1 file changed

+1
-1
lines changed
  • app/participant_portal_api/serializers

1 file changed

+1
-1
lines changed

app/participant_portal_api/serializers/file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def create(self, validated_data: dict) -> PublicFile:
1818
new_file = PublicFile(file=validated_data["file"])
1919
new_file.clean()
2020

21-
if new_file.hash and (pf := PublicFile.objects.filter(hash=new_file.hash).exists()):
21+
if new_file.hash and (pf := PublicFile.objects.filter(hash=new_file.hash).first()):
2222
return pf
2323

2424
new_file.save()

0 commit comments

Comments
 (0)