fix: dahua_enabled通过getattr获取
This commit is contained in:
parent
f3c5698283
commit
e33b4e5902
|
@ -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'],
|
||||
|
|
Loading…
Reference in New Issue