From ef8cc166c15c16a853c48f26ba750bf2c7629746 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 3 Jun 2026 17:57:24 +0530 Subject: [PATCH] ci: move nosemgrep to def line for asset_repair.on_cancel frappe-modifying-but-not-comitting anchors on the method definition, so the suppression must sit on the def line (matching the convention used elsewhere in the codebase); inner-line comments did not suppress it. --- erpnext/assets/doctype/asset_repair/asset_repair.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/assets/doctype/asset_repair/asset_repair.py b/erpnext/assets/doctype/asset_repair/asset_repair.py index 4c54ab822c5..69e9014c90b 100644 --- a/erpnext/assets/doctype/asset_repair/asset_repair.py +++ b/erpnext/assets/doctype/asset_repair/asset_repair.py @@ -215,10 +215,10 @@ class AssetRepair(AccountsController): doc = frappe.get_doc("Serial and Batch Bundle", sabb) doc.cancel() - def on_cancel(self): + def on_cancel(self): # nosemgrep if self.get("capitalize_repair_cost"): - self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry") # nosemgrep - self.asset_doc = frappe.get_lazy_doc("Asset", self.asset) # nosemgrep + self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry") + self.asset_doc = frappe.get_lazy_doc("Asset", self.asset) self.update_asset_value() self.make_gl_entries(cancel=True) self.set_increase_in_asset_life()