Skip to content

Commit c2b1186

Browse files
committed
Added the fix for an error in /apply/job API
1 parent aa1bf67 commit c2b1186

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/applicants/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def post(self, request):
5454
except Job.DoesNotExist:
5555
raise exceptions.NotFound()
5656

57-
application = Applicants.objects.first(job=job, user=user_profile)
58-
if application is not None:
57+
application = Applicants.objects.filter(job=job, user=user_profile)
58+
if application.exists():
5959
return Response(
6060
{"msg": "Already Applied!"},
6161
status=status.HTTP_403_FORBIDDEN

0 commit comments

Comments
 (0)