From 09e7bfbacb80c5e42ce6b47ff7dcf63e5810f826 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 14:04:12 +0530 Subject: [PATCH] perf: Skip link checking on repost's remove_attached_file (backport #45061) (#47450) perf: Skip link checking on repost's remove_attached_file (#45061) This is internal detail, doesn't need to do horrible link checks in framework. (cherry picked from commit 4f690affc94d7a11ba601938a77ccf1ff01a3323) Co-authored-by: Ankush Menat --- .../doctype/repost_item_valuation/repost_item_valuation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py index ecbb10b6cb5..06598aa285b 100644 --- a/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py +++ b/erpnext/stock/doctype/repost_item_valuation/repost_item_valuation.py @@ -342,7 +342,7 @@ def remove_attached_file(docname): if file_name := frappe.db.get_value( "File", {"attached_to_name": docname, "attached_to_doctype": "Repost Item Valuation"}, "name" ): - frappe.delete_doc("File", file_name, ignore_permissions=True, delete_permanently=True) + frappe.delete_doc("File", file_name, ignore_permissions=True, delete_permanently=True, force=True) def repost_sl_entries(doc):