fix: pass name string to get_doc in desktop_icon (#36292)

Previously, `get_doc` was receiving the entire `s` dictionary object instead of the document name string `s.name`. This caused a `DoesNotExistError` and `SessionBootFailed` when loading the Desk.

This change explicitly passes `s.name` to `get_doc` to ensure the Desktop Icon is retrieved correctly.
This commit is contained in:
Raj Barshikar 2026-02-02 14:37:59 +05:30 committed by GitHub
parent 2810de2dc0
commit b3bbeffdc0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -201,7 +201,7 @@ def get_desktop_icons(user=None, bootinfo=None):
permitted_parent_labels = set()
if bootinfo:
for s in user_icons:
icon = frappe.get_doc("Desktop Icon", s)
icon = frappe.get_doc("Desktop Icon", s.name)
if icon.is_permitted(bootinfo):
permitted_icons.append(s)