2019-01-30 06:18:39 +00:00
|
|
|
import frappe
|
|
|
|
|
2021-09-02 11:14:59 +00:00
|
|
|
|
2019-01-30 06:18:39 +00:00
|
|
|
def execute():
|
2022-03-28 13:22:46 +00:00
|
|
|
if "Education" in frappe.get_active_domains() and not frappe.db.exists("Role", "Guardian"):
|
2019-01-30 12:15:48 +00:00
|
|
|
doc = frappe.new_doc("Role")
|
2022-03-28 13:22:46 +00:00
|
|
|
doc.update({"role_name": "Guardian", "desk_access": 0})
|
2019-01-30 12:15:48 +00:00
|
|
|
|
|
|
|
doc.insert(ignore_permissions=True)
|