lang 4 éve
szülő
commit
ea1abc7a09
1 módosított fájl, 5 hozzáadás és 1 törlés
  1. 5 1
      Controller/CloudStorage.py

+ 5 - 1
Controller/CloudStorage.py

@@ -415,6 +415,10 @@ class CloudStorageView(View):
         if not dv_qs.exists():
             return response.json(12)
         now_time = int(time.time())
+
+        print('----------now_time')
+        print(now_time)
+
         vh_qs = VodHlsModel.objects.filter\
             (uid=uid, channel=channel, time__range=(startTime, endTime), endTime__gte=now_time). \
             values("time", "sec", "bucket__bucket", "bucket__endpoint", "bucket__region", "bucket__mold")
@@ -875,7 +879,7 @@ class CloudStorageView(View):
         pay_type = int(request_dict.get('pay_type', None))
         rank = request_dict.get('rank', None)
 
-        if uid == None or channel == None or commodity_code == None or pay_type == None or rank == None:
+        if not uid or not channel or not commodity_code or not pay_type or not rank:
             return response.json(13, '参数有误.')
         dv_qs = Device_Info.objects.filter(userID_id=userID, UID=uid, isShare=False, isExist=1)
         if not dv_qs.exists():