fix: Use parent_doctype=... syntax while fetching users with a particular role
This commit is contained in:
parent
d4b2318569
commit
4a42488b6d
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ class Role(Document):
|
|||
|
||||
def get_info_based_on_role(role, field='email'):
|
||||
''' Get information of all users that have been assigned this role '''
|
||||
users = frappe.get_list("Has Role", filters={"role": role, "parenttype": "User"},
|
||||
users = frappe.get_list("Has Role", filters={"role": role}, parent_doctype="User",
|
||||
fields=["parent as user_name"])
|
||||
|
||||
return get_user_info(users, field)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue