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 086acac + f509c16 commit be7cee7Copy full SHA for be7cee7
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