We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa1bf67 commit c2b1186Copy full SHA for c2b1186
apps/applicants/views.py
@@ -54,8 +54,8 @@ def post(self, request):
54
except Job.DoesNotExist:
55
raise exceptions.NotFound()
56
57
- application = Applicants.objects.first(job=job, user=user_profile)
58
- if application is not None:
+ application = Applicants.objects.filter(job=job, user=user_profile)
+ if application.exists():
59
return Response(
60
{"msg": "Already Applied!"},
61
status=status.HTTP_403_FORBIDDEN
0 commit comments