fix: delete portal settings for education doctypes

This commit is contained in:
Gursheen Anand 2023-08-16 12:23:10 +05:30
parent 5d7dd9b0ec
commit c071523e35

View File

@ -44,6 +44,9 @@ def execute():
doctypes = frappe.get_all("DocType", {"module": "education", "custom": 0}, pluck="name")
for doctype in doctypes:
frappe.delete_doc(
"Portal Menu Item", {"reference_doctype": doctype}, ignore_missing=True, force=True
)
frappe.delete_doc("DocType", doctype, ignore_missing=True)
frappe.delete_doc("Module Def", "Education", ignore_missing=True, force=True)