From f5ea989d2bb7f4cdad46acdc41f5707e2a52f63f Mon Sep 17 00:00:00 2001 From: sokumon Date: Fri, 2 Jan 2026 18:01:29 +0530 Subject: [PATCH] fix(patch): include icons where link type is doctype --- .../v16_0/change_link_type_to_workspace_sidebar.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/frappe/patches/v16_0/change_link_type_to_workspace_sidebar.py b/frappe/patches/v16_0/change_link_type_to_workspace_sidebar.py index ed7167409b..32e2d2269f 100644 --- a/frappe/patches/v16_0/change_link_type_to_workspace_sidebar.py +++ b/frappe/patches/v16_0/change_link_type_to_workspace_sidebar.py @@ -2,10 +2,17 @@ import frappe def execute(): - desktop_icons = frappe.get_all("Desktop Icon", filters={"icon_type": "Link"}) + desktop_icons = frappe.get_all( + "Desktop Icon", + filters={ + "icon_type": "Link", + "link_type": ["in", ["Workspace", "DocType"]], + }, + ) + for icon in desktop_icons: icon_doc = frappe.get_doc("Desktop Icon", icon.name) - if icon_doc.link_type == "Workspace" and frappe.db.exists("Workspace Sidebar", icon.name): + if frappe.db.exists("Workspace Sidebar", icon.name): icon_doc.link_type = "Workspace Sidebar" icon_doc.link_to = icon.name icon_doc.save()