chore: Update patch
This commit is contained in:
parent
6a7b45f689
commit
a7137514b6
@ -43,14 +43,17 @@ def execute():
|
|||||||
frappe.delete_doc("Number Card", card, ignore_missing=True, force=True)
|
frappe.delete_doc("Number Card", card, ignore_missing=True, force=True)
|
||||||
|
|
||||||
doctypes = frappe.get_all("DocType", {"module": "education", "custom": 0}, pluck="name")
|
doctypes = frappe.get_all("DocType", {"module": "education", "custom": 0}, pluck="name")
|
||||||
|
|
||||||
for doctype in doctypes:
|
for doctype in doctypes:
|
||||||
frappe.delete_doc("DocType", doctype, ignore_missing=True)
|
frappe.delete_doc("DocType", doctype, ignore_missing=True)
|
||||||
|
|
||||||
portal_menu_items = frappe.get_all(
|
portal_settings = frappe.get_doc("Portal Settings")
|
||||||
"Portal Menu Item", {"reference_doctype": ("in", doctypes)}, pluck="name"
|
|
||||||
)
|
for row in portal_settings.get("menu"):
|
||||||
for menu_item in portal_menu_items:
|
if row.reference_doctype in doctypes:
|
||||||
frappe.delete_doc("Portal Menu Item", menu_item, ignore_missing=True, force=True)
|
row.delete()
|
||||||
|
|
||||||
|
portal_settings.save()
|
||||||
|
|
||||||
frappe.delete_doc("Module Def", "Education", ignore_missing=True, force=True)
|
frappe.delete_doc("Module Def", "Education", ignore_missing=True, force=True)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user