chore: use frappe.in_test

This commit is contained in:
Sagar Vora
2025-06-17 21:28:21 +05:30
parent 153a70cd70
commit 7a482a6998
31 changed files with 48 additions and 48 deletions

View File

@@ -32,7 +32,7 @@ class ItemGroup(NestedSet):
# end: auto-generated types
def validate(self):
if not self.parent_item_group and not frappe.flags.in_test:
if not self.parent_item_group and not frappe.in_test:
if frappe.db.exists("Item Group", _("All Item Groups")):
self.parent_item_group = _("All Item Groups")
self.validate_item_group_defaults()