[FIX] RECRUITMENT: Fixed the self tracking login issue

This commit is contained in:
Horilla
2025-01-14 16:09:57 +05:30
parent 37d0f037fe
commit 11e8690697
2 changed files with 8 additions and 7 deletions

View File

@@ -156,11 +156,12 @@ def candidate_login_required(view_func):
if request.user.has_perm("recruitment.view_candidate"):
return view_func(request, *args, **kwargs)
if request.user:
if (
request.user.employee_get.stage_set.exists()
or request.user.employee_get.recruitment_set.exists()
):
return view_func(request, *args, **kwargs)
if request.user.is_authenticated:
if (
request.user.employee_get.stage_set.exists()
or request.user.employee_get.recruitment_set.exists()
):
return view_func(request, *args, **kwargs)
if "candidate_id" in request.session:
return view_func(request, *args, **kwargs)