fix: 人员导出excel信息bug

This commit is contained in:
caoqianming 2023-04-19 19:29:18 +08:00
parent bc6aa5cacc
commit 7128e67e92
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ class EmployeeViewSet(CustomModelViewSet):
i['id_number'], i['id_number'],
i.get('belong_dept_name', ''), i.get('belong_dept_name', ''),
epStateOptions[i['job_state']], epStateOptions[i['job_state']],
i['blt_'].get('code', '') if i['blt_'] in i else ''] i['blt_'].get('code', '') if 'blt_' in i and i['blt_'] else '']
) )
return Response({'path': export_excel(field_data, data, '人员信息')}) return Response({'path': export_excel(field_data, data, '人员信息')})