ck il y a 4 ans
Parent
commit
699f8914bd
1 fichiers modifiés avec 7 ajouts et 1 suppressions
  1. 7 1
      data_manage/pitcher_panel.py

+ 7 - 1
data_manage/pitcher_panel.py

@@ -225,7 +225,13 @@ def get_channel_again_order_trend(channel,date):
     # print(data)
     key1=['date','channel','book','pitcher','stage','cost','reg_amount','roi','new_follow','new_follow_per_cost',
          'reg_count','reg_user','cost_per_user','avg_order_amount','avg_again_order_rate','order_count']
-    json1=get_dict_list(key1,get_round(data))[0]
+
+    j=get_dict_list(key1,get_round(data))
+    if len(j) == 0:
+        return None
+    else:
+        json1 = j[0]
+
     # print(json1)
     # print(json1)
     sql2=f"""select