[hotfix] check if the item group exist or not
This commit is contained in:
parent
195d2b577f
commit
75a233b472
@ -147,6 +147,7 @@ def invalidate_cache_for(doc, item_group=None):
|
|||||||
item_group = doc.name
|
item_group = doc.name
|
||||||
|
|
||||||
for d in get_parent_item_groups(item_group):
|
for d in get_parent_item_groups(item_group):
|
||||||
d = frappe.get_doc("Item Group", d.name)
|
if frappe.db.exists("Item Group", d.get("name")):
|
||||||
|
d = frappe.get_doc("Item Group", d.get("name"))
|
||||||
if d.route:
|
if d.route:
|
||||||
clear_cache(d.route)
|
clear_cache(d.route)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user