Skip to content

Commit f509c16

Browse files
Merge pull request #135 from Himan10/apply_job_fix
Added the fix for an error in /apply/job API
2 parents d52a4f3 + c2b1186 commit f509c16

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)