mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-14 07:01:56 +00:00
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:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user