From 429996752de6f41262e8a0c88ab383523227b3de Mon Sep 17 00:00:00 2001 From: Saurabh Date: Wed, 30 Jan 2019 17:45:48 +0530 Subject: [PATCH] fix: patch fixes (#16524) --- erpnext/patches/v11_1/setup_guardian_role.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/erpnext/patches/v11_1/setup_guardian_role.py b/erpnext/patches/v11_1/setup_guardian_role.py index bb61f9818d..6ccfed9617 100644 --- a/erpnext/patches/v11_1/setup_guardian_role.py +++ b/erpnext/patches/v11_1/setup_guardian_role.py @@ -3,8 +3,10 @@ import frappe def execute(): if 'Education' in frappe.get_active_domains() and not frappe.db.exists("Role", "Guardian"): - frappe.new_doc({ - "doctype": "Role", + doc = frappe.new_doc("Role") + doc.update({ "role_name": "Guardian", "desk_access": 0 - }).insert(ignore_permissions=True) + }) + + doc.insert(ignore_permissions=True)