From 94e3b44f209258a1572d71fb40b43aed3f16382c Mon Sep 17 00:00:00 2001 From: Horilla Date: Mon, 10 Jun 2024 16:31:36 +0530 Subject: [PATCH] [FIX] HORILLA_CRUMBS: Candidate individual view bug fix --- horilla_crumbs/context_processors.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/horilla_crumbs/context_processors.py b/horilla_crumbs/context_processors.py index ddca4237b..dcb094bd9 100644 --- a/horilla_crumbs/context_processors.py +++ b/horilla_crumbs/context_processors.py @@ -3,7 +3,9 @@ from urllib.parse import urlparse from django.shortcuts import redirect from django.urls import Resolver404, path, resolve, reverse +from employee.models import Employee from horilla.urls import urlpatterns +from recruitment.models import Candidate def _split_path(self, path=None): @@ -140,6 +142,22 @@ def breadcrumbs(request): parts = _split_path(request) path = base_url + + candidates = Candidate.objects.filter(is_active=True) + + if len(parts) > 1: + if "search-candidate" in parts: + pass + elif "candidate-view" in parts: + pass + elif "get-mail-log-rec" in parts: + pass + else: + # Store the candidates in the session + request.session["filtered_candidates"] = [ + candidate.id for candidate in candidates + ] + if len(parts) == 0: user_breadcrumbs[user_id].clear() user_breadcrumb.append({"url": base_url, "name": "Horilla", "found": True})