diff --git a/apps/system/services.py b/apps/system/services.py index d013c970..1cee9bba 100644 --- a/apps/system/services.py +++ b/apps/system/services.py @@ -7,7 +7,7 @@ from apps.third.dahua import dhClient def sync_dahua_dept(dept: Dept): # 同步大华部门信息 third_info = dept.third_info - if settings.DAHUA_ENABLED: + if getattr(settings, 'DAHUA_ENABLED', False): if third_info.get('dh_id', False): data = { "id": dept.third_info['dh_id'],