Przeglądaj źródła

国内生产环境查询云存套餐不过滤像素

zhangdongming 1 rok temu
rodzic
commit
b67a01567f
1 zmienionych plików z 5 dodań i 2 usunięć
  1. 5 2
      Controller/CloudStorage.py

+ 5 - 2
Controller/CloudStorage.py

@@ -213,13 +213,16 @@ class CloudStorageView(View):
         # 没体验过的设备只返回体验套餐,体验过的不返回体验套餐
         if experience_context_qs.exists():
             if not is_ai:  # 返回云存套餐
-                store_qs = store_qs.filter(~Q(pay_type='10'), Q(pixel_level=pixel_level), Q(is_ai=0))  # 筛选像素等级
+                store_qs = store_qs.filter(~Q(pay_type='10'), Q(is_ai=0))  # 筛选像素等级
             else:  # 返回云存+AI套餐
                 is_ai = uid_set_qs[0]['is_ai']
                 is_ai = 1 if is_ai != 2 and CONFIG_INFO != CONFIG_CN else 0  # 国内不支持AI服务
                 if not is_ai:
                     return response.json(0)
-                store_qs = store_qs.filter(~Q(pay_type='10'), Q(pixel_level=pixel_level), Q(is_ai=1))  # 筛选像素等级
+                store_qs = store_qs.filter(~Q(pay_type='10'), Q(is_ai=1))  # 筛选像素等级
+
+            if CONFIG_INFO != CONFIG_CN:  # 国内生产环境不筛选像素 加载所有上架套餐
+                store_qs = store_qs.filter(Q(pixel_level=pixel_level))
         else:
             store_qs = store_qs.filter(pay_type='10')  # 体验套餐不区分像素等级