From c8c17ff5cfe41d87c0180806578e934763fb1b83 Mon Sep 17 00:00:00 2001 From: Shreya Shah Date: Fri, 6 Jul 2018 18:07:28 +0530 Subject: [PATCH] Return if Item Defaults exist (#14834) --- .../move_item_defaults_to_child_table_for_multicompany.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/patches/v11_0/move_item_defaults_to_child_table_for_multicompany.py b/erpnext/patches/v11_0/move_item_defaults_to_child_table_for_multicompany.py index 2b6a5cb9415..01f84a03136 100644 --- a/erpnext/patches/v11_0/move_item_defaults_to_child_table_for_multicompany.py +++ b/erpnext/patches/v11_0/move_item_defaults_to_child_table_for_multicompany.py @@ -16,7 +16,9 @@ def execute(): frappe.reload_doc('stock', 'doctype', 'item_default') frappe.reload_doc('stock', 'doctype', 'item') - + + if frappe.db.a_row_exists('Item Default'): return + companies = frappe.get_all("Company") if len(companies) == 1: try: