Skip to content

The agent that grows with you

fix: harden _is_recoverable_error_job against schedule=None

kshitijk4poor939dec1348d3
diff --git a/cron/jobs.py b/cron/jobs.py
index ce55cbac1b0..4b37d8537a1 100644
--- a/cron/jobs.py
+++ b/cron/jobs.py
@@ -667,7 +667,7 @@ def _is_recoverable_error_job(job: Dict[str, Any]) -> bool:
"""
return (
job.get("state") == "error"
- and job.get("schedule", {}).get("kind") in {"cron", "interval"}
+ and (job.get("schedule") or {}).get("kind") in {"cron", "interval"}
)