Merge pull request #36585 from frappe/fix/icon-patch

This commit is contained in:
Soham Kulkarni 2026-02-02 20:14:31 +05:30 committed by GitHub
commit 85da8d0cc9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,14 +5,14 @@ from frappe.model.sync import check_if_record_exists
def execute():
for icon in frappe.get_all("Desktop Icon"):
icon_doc = frappe.get_doc("Desktop Icon", icon.name)
if (icon_doc.standard and icon_doc.app) and not check_if_record_exists(
"app",
frappe.get_app_path(icon_doc.app),
"Desktop Icon",
icon_doc.name,
):
try:
try:
if (icon_doc.standard and icon_doc.app) and not check_if_record_exists(
"app",
frappe.get_app_path(icon_doc.app),
"Desktop Icon",
icon_doc.name,
):
icon_doc.standard = 0
icon_doc.save()
except Exception as e:
print("Error in unsetting standard field", e)
except Exception as e:
print("Error in unsetting standard field", e)