From e33b4e59024b581178ebac74929b2796bb476032 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 24 Apr 2024 15:55:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20dahua=5Fenabled=E9=80=9A=E8=BF=87getattr?= =?UTF-8?q?=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/system/services.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'],