Minor fix in patches (#11268)

diff --git a/erpnext/patches/v8_0/disable_instructor_role.py b/erpnext/patches/v8_0/disable_instructor_role.py
index 94ebd9c..4ba78d1 100644
--- a/erpnext/patches/v8_0/disable_instructor_role.py
+++ b/erpnext/patches/v8_0/disable_instructor_role.py
@@ -12,6 +12,7 @@
 
 	domains = frappe.db.sql_list("select domain from tabCompany")
 	if "Education" not in domains:
-		role = frappe.get_doc("Role", "Instructor")
-		role.disabled = 1
-		role.save(ignore_permissions=True)
\ No newline at end of file
+		if frappe.db.exists("Role", "Instructor"):
+			role = frappe.get_doc("Role", "Instructor")
+			role.disabled = 1
+			role.save(ignore_permissions=True)
\ No newline at end of file