fix: Check in_patch before adding 'All Item Group'

This commit is contained in:
Suraj Shetty 2019-09-02 15:53:28 +05:30
parent 402d82b4c5
commit 063144c514

View File

@ -27,7 +27,7 @@ class ItemGroup(NestedSet, WebsiteGenerator):
def validate(self):
super(ItemGroup, self).validate()
if not self.parent_item_group:
if not self.parent_item_group and not frappe.flags.in_test:
self.parent_item_group = 'All Item Groups'
self.make_route()