Explorar o código

equipmentsetst

chenjunkai %!s(int64=6) %!d(string=hai) anos
pai
achega
22793c1e06
Modificáronse 2 ficheiros con 4 adicións e 2 borrados
  1. 1 0
      Controller/DetectController.py
  2. 3 2
      Controller/EquipmentManager.py

+ 1 - 0
Controller/DetectController.py

@@ -65,6 +65,7 @@ class DetectControllerView(View):
             # 查询推送信息
             elif operation == 'queryInfo':
                 return self.do_query(request_dict, response, userID)
+            # 更新推送延迟
             elif operation == 'updateInterval':
                 return self.do_update_interval(userID, request_dict, response)
             else:

+ 3 - 2
Controller/EquipmentManager.py

@@ -638,8 +638,9 @@ def uid_status(request):
         ubqs = UID_Bucket.objects.filter(uid=uid). \
             values('bucket__content', 'status', 'channel', 'endTime', 'uid')
         nowTime = int(time.time())
-        if ubqs[0]['endTime'] > nowTime:
-            data['vod'] = list(ubqs)
+        if ubqs.exists():
+            if ubqs[0]['endTime'] > nowTime:
+                data['vod'] = list(ubqs)
         return response.json(0, data)
     else:
         return response.json(0)