获取三方token bug
This commit is contained in:
parent
9c4388da78
commit
7aa6f5ccea
|
@ -1,11 +1,11 @@
|
||||||
from apps.system.models import Dept
|
from apps.system.models import Dept
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from apps.third.tapis import dhapis
|
from apps.third.tapis import dhapis
|
||||||
|
from apps.third.dahua import dhClient
|
||||||
|
|
||||||
|
|
||||||
def sync_dahua_dept(dept: Dept):
|
def sync_dahua_dept(dept: Dept):
|
||||||
# 同步大华部门信息
|
# 同步大华部门信息
|
||||||
from apps.third.clients import dhClient
|
|
||||||
third_info = dept.third_info
|
third_info = dept.third_info
|
||||||
if settings.DAHUA_ENABLED and not third_info.get('dh_id', False):
|
if settings.DAHUA_ENABLED and not third_info.get('dh_id', False):
|
||||||
# 如果dh_id 不存在
|
# 如果dh_id 不存在
|
||||||
|
|
|
@ -5,7 +5,9 @@ from apps.utils.tasks import CustomTask
|
||||||
from apps.third.models import Tlog
|
from apps.third.models import Tlog
|
||||||
from celery import shared_task
|
from celery import shared_task
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from apps.third.clients import xxClient, dhClient, spClient
|
from apps.third.dahua import dhClient
|
||||||
|
from apps.third.xunxi import xxClient
|
||||||
|
from apps.third.speaker import spClient
|
||||||
|
|
||||||
|
|
||||||
@shared_task(base=CustomTask)
|
@shared_task(base=CustomTask)
|
||||||
|
|
Loading…
Reference in New Issue