fix: check if role exists before renaming
This commit is contained in:
committed by
GitHub
parent
0f64da69c0
commit
889bc2b1c7
@@ -2,5 +2,5 @@ import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
if frappe.db.exists("Role", "Class Evaluator"):
|
||||
if frappe.db.exists("Role", "Class Evaluator") and not frappe.db.exists("Role", "Batch Evaluator"):
|
||||
frappe.rename_doc("Role", "Class Evaluator", "Batch Evaluator")
|
||||
|
||||
Reference in New Issue
Block a user