refactor: remove usage of raise_exception (#39309)
diff --git a/erpnext/setup/doctype/employee/employee.py b/erpnext/setup/doctype/employee/employee.py
index 4bb3539..5237f5a 100755
--- a/erpnext/setup/doctype/employee/employee.py
+++ b/erpnext/setup/doctype/employee/employee.py
@@ -87,7 +87,7 @@
def update_user_permissions(self):
if not self.create_user_permission:
return
- if not has_permission("User Permission", ptype="write", raise_exception=False):
+ if not has_permission("User Permission", ptype="write", print_logs=False):
return
employee_user_permission_exists = frappe.db.exists(
@@ -258,7 +258,7 @@
def update_user_permissions(doc, method):
# called via User hook
if "Employee" in [d.role for d in doc.get("roles")]:
- if not has_permission("User Permission", ptype="write", raise_exception=False):
+ if not has_permission("User Permission", ptype="write", print_logs=False):
return
employee = frappe.get_doc("Employee", {"user_id": doc.name})
employee.update_user_permissions()