Commit ee4d50fb authored by 许俊鹏's avatar 许俊鹏

Merge branch 'xujunpeng/feature/2_0_1' into 'test'

对文件重的数据做一次过滤

See merge request alpha/sun!219
parents 00ec17d1 5b32032c
......@@ -110,6 +110,12 @@ class AddVirtFans(APIView):
fans_num_column = [item.value for item in columns[1]]
user_id_fans_num_data = list(zip(user_id_column[1:], fans_num_column[1:]))
#做一次数据清洗。 避免文件中的空行
user_id_fans_num_data = [
(user_id, fans_num) for user_id, fans_num in user_id_fans_num_data
if isinstance(user_id, int) and isinstance(fans_num, int)
]
try:
self.rpc['venus/sun/tools/add_virt_fans'](data=user_id_fans_num_data).unwrap()
except:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment