fix(patch): include icons where link type is doctype
This commit is contained in:
parent
e7c77b9ce9
commit
f5ea989d2b
1 changed files with 9 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue