From 7c6e2795990be9fc95835ed9c841e18cada696c5 Mon Sep 17 00:00:00 2001 From: Ejaaz Khan Date: Mon, 20 Jan 2025 17:49:18 +0530 Subject: [PATCH] fix: broken image issue in BOM Tree --- erpnext/manufacturing/doctype/bom/bom_item_preview.html | 2 +- erpnext/manufacturing/doctype/bom/bom_tree.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/manufacturing/doctype/bom/bom_item_preview.html b/erpnext/manufacturing/doctype/bom/bom_item_preview.html index 2c0f091da588..4cd06bbd024f 100644 --- a/erpnext/manufacturing/doctype/bom/bom_item_preview.html +++ b/erpnext/manufacturing/doctype/bom/bom_item_preview.html @@ -1,7 +1,7 @@
- {% if data.image %} + {% if data.image && (data.image).replace("''", "").length %}
diff --git a/erpnext/manufacturing/doctype/bom/bom_tree.js b/erpnext/manufacturing/doctype/bom/bom_tree.js index 534de0e654bc..cf2e56c6f039 100644 --- a/erpnext/manufacturing/doctype/bom/bom_tree.js +++ b/erpnext/manufacturing/doctype/bom/bom_tree.js @@ -63,7 +63,7 @@ frappe.treeview_settings["BOM"] = { if (node.is_root && node.data.value != "BOM") { frappe.model.with_doc("BOM", node.data.value, function () { var bom = frappe.model.get_doc("BOM", node.data.value); - node.data.image = escape(bom.image) || ""; + node.data.image = bom.image || ""; node.data.description = bom.description || ""; node.data.item_code = bom.item || ""; });