From 4a5731ea2bc5dceccfeb0dc37c1030d58f90b1bd Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Thu, 16 Jan 2025 17:59:56 +0530 Subject: [PATCH] fix(bench): Use AgentJob.reference_name to find AppPatch get_last_doc doesn't seem to always work with multi-line text References: https://frappecloud.com/app/agent-job/ks5u1vo3ei https://frappecloud.com/app/error-log/9vat5quk87 --- press/press/doctype/app_patch/app_patch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/press/press/doctype/app_patch/app_patch.py b/press/press/doctype/app_patch/app_patch.py index bba5910568..db0bf673c7 100644 --- a/press/press/doctype/app_patch/app_patch.py +++ b/press/press/doctype/app_patch/app_patch.py @@ -132,7 +132,7 @@ def patch_app(self, revert: bool): @staticmethod def process_patch_app(agent_job: "AgentJob"): request_data = json.loads(agent_job.request_data) - app_patch = frappe.doc("App Patch", agent_job.reference_name, for_update=True) + app_patch = frappe.get_doc("App Patch", agent_job.reference_name, for_update=True) revert = request_data.get("revert") if agent_job.status == "Failure" and revert: