Skip to content

Commit

Permalink
fix(setup): avoid duplicate entry for Analytics role (#40183)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchamahabal authored Feb 29, 2024
1 parent f6fdfd2 commit 29f91a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion erpnext/setup/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@


def after_install():
frappe.get_doc({"doctype": "Role", "role_name": "Analytics"}).insert()
if not frappe.db.exists("Role", "Analytics"):
frappe.get_doc({"doctype": "Role", "role_name": "Analytics"}).insert()

set_single_defaults()
create_print_setting_custom_fields()
add_all_roles_to("Administrator")
Expand Down

0 comments on commit 29f91a7

Please sign in to comment.