mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-14 13:42:56 +08:00
fix(scheduler_admin): 修复定时任务列表页码显示逻辑 (#2016)
* fix(scheduler_admin): 修复定时任务列表页码显示逻辑
- 在格式化定时任务列表图像时,添加对当前页码的可用性判断
- 如果页码不可用,则将当前页码默认设置为 1,避免显示错误的页码信息
* 🚨 auto fix by pre-commit hooks
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
6d1789bbee
commit
2fed781350
@ -76,7 +76,9 @@ async def handle_view(
|
||||
await schedule_cmd.finish("没有找到任何相关的定时任务。")
|
||||
|
||||
img = await presenters.format_schedule_list_as_image(
|
||||
schedules=schedules, title=title, current_page=page.result
|
||||
schedules=schedules,
|
||||
title=title,
|
||||
current_page=page.result if page.available else 1,
|
||||
)
|
||||
await MessageUtils.build_message(img).send(reply_to=True)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user