diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index ddc3f9a3..7c420ad9 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -926,7 +926,6 @@ export class ProfileEmployeeController extends Controller { .leftJoinAndSelect("employeePosMaster.orgChild3", "orgChild3") .leftJoinAndSelect("employeePosMaster.orgChild4", "orgChild4") .leftJoinAndSelect("employeePosMaster.positions", "positions") - .leftJoinAndSelect("positions.posExecutive", "posExecutive") .leftJoinAndSelect("current_holder.profileSalary", "profileSalary") .leftJoinAndSelect("current_holder.profileDiscipline", "profileDiscipline") .leftJoinAndSelect("current_holder.posLevel", "posLevel") @@ -1059,8 +1058,10 @@ export class ProfileEmployeeController extends Controller { posMasterNoSuffix: item.posMasterNoSuffix, orgShortName: orgShortName, position: item.current_holder.position, - posType: item.current_holder.posType.posTypeName, - posLevel: item.current_holder.posLevel.posLevelName, + posType: + item.current_holder.posType == null ? null : item.current_holder.posType.posTypeName, + posLevel: + item.current_holder.posLevel == null ? null : item.current_holder.posLevel.posLevelName, amount: amount ? amount : null, rootId: item.orgRootId, root: item.orgRoot?.orgRootName ? item.orgRoot.orgRootName : null,