[FIX] DASHBOARD: Attendance analytic chart unwanted labels

This commit is contained in:
Horilla
2024-02-16 10:32:18 +05:30
parent a0f5cc209e
commit 2db02674b0

View File

@@ -174,17 +174,18 @@ def dashboard_pipeline(request):
labels = [type[1] for type in Stage.stage_types]
for rec in recruitment_obj:
data = [stage_type_candidate_count(rec, type[0]) for type in Stage.stage_types]
data_set.append(
{
"label": (
rec.title
if rec.title is not None
else f"""{rec.job_position_id}
{rec.start_date}"""
),
"data": data,
}
)
if rec.candidate.all():
data_set.append(
{
"label": (
rec.title
if rec.title is not None
else f"""{rec.job_position_id}
{rec.start_date}"""
),
"data": data,
}
)
return JsonResponse(
{"dataSet": data_set, "labels": labels, "message": _("No data Found...")}
)