fix: delete doc without filters
This commit is contained in:
parent
c071523e35
commit
d119d2ec32
@ -44,11 +44,14 @@ 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)
|
||||
|
||||
portal_menu_items = frappe.get_all(
|
||||
"Portal Menu Item", {"reference_doctype": ("in", doctypes)}, pluck="name"
|
||||
)
|
||||
for menu_item in portal_menu_items:
|
||||
frappe.delete_doc("Portal Menu Item", menu_item, ignore_missing=True, force=True)
|
||||
|
||||
frappe.delete_doc("Module Def", "Education", ignore_missing=True, force=True)
|
||||
|
||||
click.secho(
|
||||
|
Loading…
Reference in New Issue
Block a user