Kaynağa Gözat

Update alg_growth_3rd_gh_reply_video_v1: fix send_n value

StrayWarrior 2 ay önce
ebeveyn
işleme
894dcf11d3
1 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 3 2
      alg_growth_3rd_gh_reply_video_v1.py

+ 3 - 2
alg_growth_3rd_gh_reply_video_v1.py

@@ -65,7 +65,8 @@ def get_and_update_gh_ids(run_dt):
 
     # default单独处理
     if 'default' not in account_df['gh_id'].values:
-        new_row = pd.DataFrame({'gh_id': ['default'], 'gh_name': ['默认'], 'type': [2], 'category1': ['泛生活']},
+        new_row = pd.DataFrame({'gh_id': ['default'], 'gh_name': ['默认'],
+                                'type': [2], 'category1': ['泛生活'], 'send_n': 1},
                                index=[0])
         account_df = pd.concat([account_df, new_row], ignore_index=True)
 
@@ -76,7 +77,7 @@ def get_and_update_gh_ids(run_dt):
     account_map = { x['gh_id']: x for x in account_df.to_dict(orient='records') }
     for gh_id in account_map:
         account_info = account_map[gh_id]
-        account_info['send_n'] = account_info.get('send_n', 1)
+        account_info['send_n'] = int(account_info.get('send_n', 1))
     return account_df