ci: silence false-positive semgrep findings on relocated code

Both patterns are unchanged from develop but newly appear in the diff
because the refactoring relocated them:

- purchase_order/mapper.make_purchase_invoice_from_portal: portal flow
  needs commit before redirect (matches develop behaviour)
- asset_repair.on_cancel: ignore_linked_doctypes is a runtime cancel flag,
  not a persisted field
This commit is contained in:
Nabin Hait
2026-06-03 16:23:30 +05:30
parent 092d8f771c
commit 4c6f33000b
2 changed files with 2 additions and 2 deletions

View File

@@ -218,7 +218,7 @@ class AssetRepair(AccountsController):
def on_cancel(self):
self.asset_doc = frappe.get_doc("Asset", self.asset)
if self.get("capitalize_repair_cost"):
self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry")
self.ignore_linked_doctypes = ("GL Entry", "Stock Ledger Entry") # nosemgrep
self.update_asset_value()
self.make_gl_entries(cancel=True)
self.set_increase_in_asset_life()

View File

@@ -115,7 +115,7 @@ def make_purchase_invoice_from_portal(purchase_order_name: str):
frappe.throw(_("Not Permitted"), frappe.PermissionError)
doc.save()
if not frappe.in_test:
frappe.db.commit()
frappe.db.commit() # nosemgrep
frappe.response["type"] = "redirect"
frappe.response.location = "/purchase-invoices/" + doc.name