fix: resolve receiver by role for Administrator correctly in notifications
This commit is contained in:
parent
872e4586c8
commit
aed7c5d589
1 changed files with 4 additions and 0 deletions
|
|
@ -89,6 +89,10 @@ class Role(Document):
|
|||
|
||||
def get_info_based_on_role(role, field="email", ignore_permissions=False):
|
||||
"""Get information of all users that have been assigned this role"""
|
||||
if role == "Administrator":
|
||||
user = frappe.db.get_value("User", "Administrator", field)
|
||||
return [user] if user else []
|
||||
|
||||
users = frappe.get_list(
|
||||
"Has Role",
|
||||
filters={"role": role, "parenttype": "User"},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue