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.
2 parents d52a4f3 + c2b1186 commit f509c16Copy full SHA for f509c16
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