From 4f4f58293f57a5b44107eef43b357874684cb192 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 12 Jun 2012 17:03:09 +0530 Subject: [PATCH] fix in item group on_trash --- 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 161ce4e1b4..7e92f53cf4 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -66,7 +66,7 @@ class DocType: item = sql("select name from `tabItem` where ifnull(item_group, '') = %s", self.doc.name) item = [d[0] for d in item] - if ig: + if item: msgprint("""Item Group: %s can not be trashed/deleted because it is used in item: %s. To trash/delete this, remove/change item group in item master""" % (self.doc.name, item or ''), raise_exception=1)