Skip to content

Commit

Permalink
Update views.py
Browse files Browse the repository at this point in the history
  • Loading branch information
QA2A authored Aug 12, 2024
1 parent 16faab5 commit 8487529
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1607,19 +1607,21 @@ def resume_view(request, slug):
# if status = passed, then show 404
if applications.filter(stage__name="Passed").exists():
raise Http404


if not applications:
raise Http404

# log the request to the Request table
RequestLog.objects.create(
profile=profile,
company=company,
email=request.GET.get("e"),
applications=applications,
applications=applications.count(),
ip_address=request.META.get("REMOTE_ADDR"),
user_agent=request.META.get("HTTP_USER_AGENT"),
referer=request.META.get("HTTP_REFERER"),
)
if not applications:
raise Http404

else:
if profile.user != request.user:
raise Http404
Expand Down

0 comments on commit 8487529

Please sign in to comment.