job linkked successfully

Department_Module
ahmed.mujtaba 2026-09-14 18:21:23 +05:00
parent f86c908076
commit 3c0421c2ec
3 changed files with 4 additions and 2 deletions

View File

@ -83,7 +83,7 @@ def serialize_job_row(row, *, names=None, recruiter_name=None, hiring_manager_na
return {
"id": str(row.id),
"title": row.title,
"department": row.department or None,
"department": row.department_ref.name if row.department_ref else None,
"department_id": str(row.department_id) if row.department_id else None,
"location": row.location,
"employment_type": row.employment_type,

View File

@ -461,9 +461,11 @@ class JobPost:
if payload.get("department_id"):
department=await self._require_department(payload.get("department_id"))
fields["department_id"]=department.id
fields["department_ref"]=department
fields["department"]=department.name
else:
fields["department_id"]=None
fields["department_ref"]=None
fields["department"]=""
assignment=Assignment(self.session)

View File

@ -44,7 +44,7 @@ async function fetchJobs() {
}
function deptValue(j) {
return String(j.requisitionDepartment || j.department || '').trim()
return String(j.department || '').trim()
}
function deptLabel(j) {