From 2fed7813503a0ef742ae25685f922cab84324b26 Mon Sep 17 00:00:00 2001 From: molanp <104612722+molanp@users.noreply.github.com> Date: Mon, 11 Aug 2025 10:15:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(scheduler=5Fadmin):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E5=88=97=E8=A1=A8=E9=A1=B5?= =?UTF-8?q?=E7=A0=81=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91=20(#2016)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(scheduler_admin): 修复定时任务列表页码显示逻辑 - 在格式化定时任务列表图像时,添加对当前页码的可用性判断 - 如果页码不可用,则将当前页码默认设置为 1,避免显示错误的页码信息 * :rotating_light: auto fix by pre-commit hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- zhenxun/builtin_plugins/scheduler_admin/handlers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zhenxun/builtin_plugins/scheduler_admin/handlers.py b/zhenxun/builtin_plugins/scheduler_admin/handlers.py index 060aeab3..8bc54287 100644 --- a/zhenxun/builtin_plugins/scheduler_admin/handlers.py +++ b/zhenxun/builtin_plugins/scheduler_admin/handlers.py @@ -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)