浏览代码

Merge remote-tracking branch 'remotes/origin/peng' into test

Ansjer 2 年之前
父节点
当前提交
65eb22f3f9
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Controller/IcloudService/IcloudService.py

+ 2 - 2
Controller/IcloudService/IcloudService.py

@@ -398,8 +398,6 @@ class IcloudServiceView(View):
         line = request_dict.get('line', None)
         line = request_dict.get('line', None)
         if not all([page, line]):
         if not all([page, line]):
             return response.json(444, {'error param': 'page, line'})
             return response.json(444, {'error param': 'page, line'})
-        uid_list = uid.split(',')
-        file_type_list = file_type.split(',')
         page = int(page)
         page = int(page)
         line = int(line)
         line = int(line)
         now_time = int(time.time())
         now_time = int(time.time())
@@ -416,8 +414,10 @@ class IcloudServiceView(View):
         if start_time and end_time:  # 按时间段查询
         if start_time and end_time:  # 按时间段查询
             icloud_record_qs = icloud_record_qs.filter(time_stamp__gte=start_time, time_stamp__lt=end_time)
             icloud_record_qs = icloud_record_qs.filter(time_stamp__gte=start_time, time_stamp__lt=end_time)
         if uid:  # 按设备昵称查询
         if uid:  # 按设备昵称查询
+            uid_list = uid.split(',')
             icloud_record_qs = icloud_record_qs.filter(uid__in=uid_list)
             icloud_record_qs = icloud_record_qs.filter(uid__in=uid_list)
         if file_type:  # 按文件类型查询
         if file_type:  # 按文件类型查询
+            file_type_list = file_type.split(',')
             icloud_record_qs = icloud_record_qs.filter(file_type__in=file_type_list)
             icloud_record_qs = icloud_record_qs.filter(file_type__in=file_type_list)
         icloud_record_qs = icloud_record_qs.values('bucket_id', 'sec', 'fg', 'nickname', 'uid', 'channel', 'size', 'id',
         icloud_record_qs = icloud_record_qs.values('bucket_id', 'sec', 'fg', 'nickname', 'uid', 'channel', 'size', 'id',
                                                    'time_stamp', 'file_type').order_by('-time_stamp')[
                                                    'time_stamp', 'file_type').order_by('-time_stamp')[