Skip to content

Commit

Permalink
Merge pull request #792 from Ikaros-521/owner
Browse files Browse the repository at this point in the history
定时任务 空文案情况下随机文案出错bug修复
  • Loading branch information
Ikaros-521 authored Apr 29, 2024
2 parents 2fcb908 + fe952a0 commit f76d340
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,9 @@ def schedule_task(index):


# 根据对应索引从列表中随机获取一个值
if len(config.get("schedule")[index]["copy"]) <= 0:
return None

random_copy = random.choice(config.get("schedule")[index]["copy"])

# 假设有多个未知变量,用户可以在此处定义动态变量
Expand Down

0 comments on commit f76d340

Please sign in to comment.