empolyee update dahua

This commit is contained in:
曹前明 2022-10-23 14:00:21 +08:00
parent 63bd3286c6
commit 98035be264
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ class EmployeeCreateUpdateSerializer(CustomModelSerializer):
# 同时去除门禁授权
if settings.DAHUA_ENABLED and dhClient:
# 如果是正式员工或相关方且有门禁权限:
if instance.type in ['employee', 'remployee'] and instance.third_info.get('dh_face_card', None):
if instance.type in ['employee', 'remployee']:
start_time = None
end_time = None
if instance.job_state == 20 and old_job_state == 10: # 离职