minor fix
This commit is contained in:
parent
79ba422273
commit
3b04cfc812
@ -120,8 +120,9 @@ def enable_all_roles_and_domains():
|
||||
_role.save()
|
||||
|
||||
# add all roles to users
|
||||
user = frappe.get_doc("User", "Administrator")
|
||||
user.add_roles(*[role.get("name") for role in roles])
|
||||
if roles:
|
||||
user = frappe.get_doc("User", "Administrator")
|
||||
user.add_roles(*[role.get("name") for role in roles])
|
||||
|
||||
domains = frappe.get_list("Domain")
|
||||
if not domains:
|
||||
|
Loading…
x
Reference in New Issue
Block a user