Skip to content

Commit

Permalink
fix: patch for removing doctypes
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Oct 27, 2021
1 parent 43eaa33 commit 27860ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions erpnext/patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,4 @@ erpnext.patches.v12_0.update_production_plan_status
erpnext.patches.v13_0.healthcare_deprecation_warning
erpnext.patches.v14_0.delete_healthcare_doctypes
erpnext.patches.v13_0.create_pan_field_for_india #2
erpnext.patches.v14_0.delete_hub_doctypes
10 changes: 10 additions & 0 deletions erpnext/patches/v14_0/delete_hub_doctypes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import frappe


def execute():

doctypes = frappe.get_all("DocType", {"module": "Hub Node", "custom": 0}, pluck='name')
for doctype in doctypes:
frappe.delete_doc("DocType", doctype, ignore_missing=True)

frappe.delete_doc("Module Def", "Hub Node", ignore_missing=True, force=True)

0 comments on commit 27860ef

Please sign in to comment.