mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-30 07:08:24 +00:00
refactor: method to get employee contact without permission check
This commit is contained in:
@@ -442,6 +442,10 @@ def get_contact_details(employee: str) -> dict:
|
||||
|
||||
frappe.has_permission("Employee", "read", employee, throw=True)
|
||||
|
||||
return _get_contact_details(employee)
|
||||
|
||||
|
||||
def _get_contact_details(employee: str) -> dict:
|
||||
contact_data = frappe.db.get_value(
|
||||
"Employee",
|
||||
employee,
|
||||
|
||||
Reference in New Issue
Block a user