Pārlūkot izejas kodu

修改推送IPC不支持智能算法默认打开APP移动推送

zhangdongming 9 mēneši atpakaļ
vecāks
revīzija
cf5b67b861
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      Controller/DetectControllerV2.py

+ 2 - 1
Controller/DetectControllerV2.py

@@ -224,8 +224,9 @@ class DetectControllerViewV2(View):
 
                     types = ALGORITHM_COMBO_TYPES
                     device_type = device_info_qs[0].Type
+                    ai_type = uid_set_qs.first().ai_type
                     # IPC默认关闭移动侦测APP通知
-                    if device_type and device_type not in [1, 2, 3, 4, 10001]:
+                    if ai_type > 0 and device_type and device_type not in [1, 2, 3, 4, 10001]:
                         types = [x for x in types if x != 51]
                     msg_data = {'appPush': 1,
                                 'pushTime': {'allDay': 1, 'repeat': 127, 'endTime': 0, 'timeZone': '+08.00',