[FIX] BASE: fixed rotating work type and shift assign detail view for employees without work info
This commit is contained in:
@@ -619,11 +619,8 @@ class RotatingWorkTypeAssign(HorillaModel):
|
||||
"""
|
||||
Return subtitle containing both department and job position information.
|
||||
"""
|
||||
try:
|
||||
return f"""{self.employee_id.employee_work_info.department_id } /
|
||||
{ self.employee_id.employee_work_info.job_position_id}"""
|
||||
except:
|
||||
return None
|
||||
|
||||
return f"{self.employee_id.get_department()} / {self.employee_id.get_job_position()}"
|
||||
|
||||
def work_rotate_detail_view(self):
|
||||
"""
|
||||
@@ -1214,8 +1211,7 @@ class RotatingShiftAssign(HorillaModel):
|
||||
Detail view subtitle
|
||||
"""
|
||||
|
||||
return f"""{self.employee_id.employee_work_info.department_id } /
|
||||
{ self.employee_id.employee_work_info.job_position_id}"""
|
||||
return f"{self.employee_id.get_department()} / {self.employee_id.get_job_position()}"
|
||||
|
||||
def check_active(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user