From 094617d29a2183b63b4fd635d847fa9e1006975b Mon Sep 17 00:00:00 2001 From: Gaurav Naik Date: Fri, 8 Jun 2018 11:44:27 +0530 Subject: [PATCH] Fix to allow migration of individual sites (#14413) --- .../patches/v11_0/rename_supplier_type_to_supplier_group.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py b/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py index 1735c1224e1..83130966d4c 100644 --- a/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py +++ b/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py @@ -5,7 +5,9 @@ from frappe import _ from frappe.utils.nestedset import rebuild_tree def execute(): - if frappe.db.table_exists("Supplier Type") and not frappe.db.table_exists("Supplier Group"): + if frappe.db.table_exists("Supplier Group"): + frappe.reload_doc('setup', 'doctype', 'supplier_group') + elif frappe.db.table_exists("Supplier Type"): rename_doc("DocType", "Supplier Type", "Supplier Group", force=True) frappe.reload_doc('setup', 'doctype', 'supplier_group') frappe.reload_doc("accounts", "doctype", "pricing_rule")