[FIX] DASHBOARD: Archived and closed recruitments showing in the dashboard

This commit is contained in:
Horilla
2024-02-17 14:43:31 +05:30
parent 6a31239396
commit 9ff537651d

View File

@@ -1320,7 +1320,7 @@ def hired_candidate_chart(request):
data = []
background_color = []
border_color = []
recruitments = Recruitment.objects.all()
recruitments = Recruitment.objects.filter(closed=False, is_active=True)
for recruitment in recruitments:
red = random.randint(0, 255)
green = random.randint(0, 255)
@@ -1356,7 +1356,7 @@ def onboard_candidate_chart(request):
data = []
background_color = []
border_color = []
recruitments = Recruitment.objects.all()
recruitments = Recruitment.objects.filter(closed=False, is_active=True)
for recruitment in recruitments:
red = random.randint(0, 255)
green = random.randint(0, 255)
@@ -1365,7 +1365,7 @@ def onboard_candidate_chart(request):
border_color.append(f"rgb({red}, {green}, {blue})")
labels.append(recruitment.title)
data.append(
recruitment.candidate.filter(hired=True, start_onboard=True).count()
recruitment.candidate.filter(start_onboard=True).count()
)
return JsonResponse(
{