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:
parent
e5fd1c7b43
commit
dcbfc79f8d
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue