[FIX] ONBOARDING: Fixed onboarding portal send issue
This commit is contained in:
@@ -400,10 +400,10 @@ def change_stage(request):
|
||||
for employee in employees:
|
||||
employee.stage_id = stage
|
||||
employee.save()
|
||||
# if stage.type == "archived":
|
||||
# Employee.objects.filter(
|
||||
# id__in=employees.values_list("employee_id__id", flat=True)
|
||||
# ).update(is_active=False)
|
||||
if stage.type == "archived":
|
||||
Employee.objects.filter(
|
||||
id__in=employees.values_list("employee_id__id", flat=True)
|
||||
).update(is_active=False)
|
||||
stage_forms = {}
|
||||
stage_forms[str(stage.offboarding_id.id)] = StageSelectForm(
|
||||
offboarding=stage.offboarding_id
|
||||
|
||||
@@ -670,7 +670,7 @@ def email_send(request):
|
||||
for cand_id in candidates:
|
||||
attachments = list(set(attachments_other) | set([]))
|
||||
candidate = Candidate.objects.get(id=cand_id)
|
||||
if not request.GET["no_portal"]:
|
||||
if not request.GET.get("no_portal"):
|
||||
if candidate.converted_employee_id:
|
||||
messages.info(
|
||||
request, _(f"{candidate} has already been converted to employee.")
|
||||
|
||||
Reference in New Issue
Block a user