fix: forward include_disabled through cron.manage list (#85566)

cronjob(action=list) defaults to include_disabled=False, so pausing a
job makes it vanish from any ws-driven UI's next refresh — an
enable/disable toggle reads as silent deletion (reported against the
Hermes-Bot-Mode routines pane). Forward the flag from params.
This commit is contained in:
Teknium 2026-08-13 12:14:33 -07:00 committed by GitHub
parent e5fd1c7b43
commit dcbfc79f8d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 1 deletions

View File

@ -1633,7 +1633,17 @@ def _(rid, params: dict) -> dict:
from tools.cronjob_tools import cronjob
if action == "list":
return _ok(rid, json.loads(cronjob(action="list")))
# Paused jobs are excluded by default, which reads as deletion in
# any UI with an enable/disable toggle — forward the flag.
return _ok(
rid,
json.loads(
cronjob(
action="list",
include_disabled=is_truthy_value(params.get("include_disabled", False)),
)
),
)
if action == "add":
return _ok(
rid,