ソースを参照

定时更新指定版本配置信息3

guanhailong 2 年 前
コミット
4ee199b716
1 ファイル変更4 行追加5 行削除
  1. 4 5
      Controller/Cron/CronTaskController.py

+ 4 - 5
Controller/Cron/CronTaskController.py

@@ -68,7 +68,7 @@ class CronDelDataView(View):
         @return:
         """
         try:
-            ucode_list = ('823C01552AA',
+            ucode_list = ['823C01552AA',
                           '823C01550AA',
                           '823C01850XA',
                           '730201350AA',
@@ -80,10 +80,9 @@ class CronDelDataView(View):
                           '72V201353AA',
                           '72V201354AA',
                           '72V201355AA',
-                          '72V201254AA')
-            UidSetModel.objects.filter(
-                Q(ucode__in=ucode_list, is_human=0) | Q(ucode='72V201254AA', mobile_4g=0)).update(is_human=1,
-                                                                                                  mobile_4g=1)
+                          '72V201254AA']
+            UidSetModel.objects.filter(ucode__in=ucode_list, is_human=0).update(is_human=1)
+            UidSetModel.objects.filter(ucode__in='72V201254AA', mobile_4g=0).update(mobile_4g=1)
             return response.json(0)
         except Exception as e:
             return response.json(500, repr(e))