fix: dont throw error for agent role

(cherry picked from commit 5229c333b7)
This commit is contained in:
Ritvik Sardana
2026-06-11 09:24:58 +00:00
committed by Mergify
parent ca2e080128
commit a278db3d61
+4 -2
View File
@@ -8,8 +8,10 @@ from helpdesk.integrations.erpnext.utils import set_links, should_sync
@frappe.whitelist()
def get_sync_info() -> dict:
frappe.has_permission("Customer", "read", throw=True)
frappe.has_permission("HD Customer", "read", throw=True)
if not frappe.has_permission("Customer", "read") or not frappe.has_permission(
"HD Customer", "read"
):
return {"enabled": False}
if "erpnext" not in frappe.get_installed_apps():
return {"enabled": False}