diff --git a/press/press/doctype/agent_request_failure/agent_request_failure.py b/press/press/doctype/agent_request_failure/agent_request_failure.py index fb5b8f1f79..cac2de5637 100644 --- a/press/press/doctype/agent_request_failure/agent_request_failure.py +++ b/press/press/doctype/agent_request_failure/agent_request_failure.py @@ -37,6 +37,7 @@ def remove_old_failures(): failures = frappe.get_all( "Agent Request Failure", ["name", "server_type", "server", "failure_count"], + {"status": ("!=", "Archived")}, order_by="creation ASC", ) for failure in failures: