From 03c30a7f92015bdf95928c63874e448feb41c1c4 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 5 Jul 2017 15:12:07 +0530 Subject: [PATCH] [minor] throw name error if group matches with name, for setup wizard to nicely catch the exception --- erpnext/setup/doctype/item_group/item_group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py index 9c2a4002a12..adff615cef7 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -56,7 +56,7 @@ class ItemGroup(NestedSet, WebsiteGenerator): def validate_name_with_item(self): if frappe.db.exists("Item", self.name): - frappe.throw(frappe._("An item exists with same name ({0}), please change the item group name or rename the item").format(self.name)) + frappe.throw(frappe._("An item exists with same name ({0}), please change the item group name or rename the item").format(self.name), frappe.NameError) def get_context(self, context): context.show_search=True