Skip to content

Commit

Permalink
fix(bench): Use AgentJob.reference_name to find AppPatch
Browse files Browse the repository at this point in the history
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
  • Loading branch information
adityahase committed Jan 16, 2025
1 parent 4be5b84 commit 4a5731e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion press/press/doctype/app_patch/app_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4a5731e

Please sign in to comment.