Quellcode durchsuchen

Merge branch '2024-11-20-master-change-position' of Server/title_with_video into master

luojunhui vor 5 Monaten
Ursprung
Commit
ba7fdacbc9
1 geänderte Dateien mit 3 neuen und 4 gelöschten Zeilen
  1. 3 4
      applications/deal/response.py

+ 3 - 4
applications/deal/response.py

@@ -193,13 +193,12 @@ class Response(object):
             "productionPath": productionPath,
             "videoUrl": videoUrl,
             "mini_id": mini_id,
-            "paragraphPosition": index * 0.25,
         }
-        # if gh_id in self.test_id_set and index == 1:
-        # 只针对插入的第一个小程序位置做改变
+
         if index == 1:
             result['paragraphPosition'] = 0.01
-
+        else:
+            result['paragraphPosition'] = (index - 1) * 0.25
         update_result_sql = f"""
                             UPDATE {db_article}
                             SET