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.
This commit is contained in:
Nabin Hait
2026-06-03 17:57:24 +05:30
parent 5adeca44da
commit ef8cc166c1

View File

@@ -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()