[minor] throw name error if group matches with name, for setup wizard to nicely catch the exception
This commit is contained in:
parent
949a920022
commit
03c30a7f92
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user