Merge pull request #9757 from mbauskar/breadcrumb-fixes

[hotfix] check if the item group exist or not
This commit is contained in:
Nabin Hait 2017-07-10 15:32:52 +05:30 committed by GitHub
commit 68ed0488a3

View File

@ -147,6 +147,7 @@ def invalidate_cache_for(doc, item_group=None):
item_group = doc.name
for d in get_parent_item_groups(item_group):
d = frappe.get_doc("Item Group", d.name)
if d.route:
clear_cache(d.route)
if frappe.db.exists("Item Group", d.get("name")):
d = frappe.get_doc("Item Group", d.get("name"))
if d.route:
clear_cache(d.route)