Browse Source

PC工具查询测试版返回所有版本中的最新版本

locky 3 years ago
parent
commit
942c8e5242
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Controller/PcInfo.py

+ 4 - 1
Controller/PcInfo.py

@@ -132,7 +132,10 @@ class PcInfo(View):
             region_name='cn-northwest-1')
         version_list = []
         for i in range(2):
-            app_list = Pc_Info.objects.filter(pc_name=pc_name, bundle_version=bundle_version, pc_test=pc_test, is_update=i)
+            if pc_test == '1':      # 测试版返回所有版本中的最新版本
+                app_list = Pc_Info.objects.filter(pc_name=pc_name, bundle_version=bundle_version, is_update=i)
+            else:
+                app_list = Pc_Info.objects.filter(pc_name=pc_name, bundle_version=bundle_version, pc_test=pc_test, is_update=i)
             # 当前软件不存在强制更新(is_update=1)的版本返回空
             if not app_list.exists():
                 res = {'pc_name': '',