fix: Exclude unpublished items while fetching items from other item groups
diff --git a/erpnext/e_commerce/product_data_engine/query.py b/erpnext/e_commerce/product_data_engine/query.py
index 6cbdc7f..007bf8b 100644
--- a/erpnext/e_commerce/product_data_engine/query.py
+++ b/erpnext/e_commerce/product_data_engine/query.py
@@ -196,7 +196,10 @@
website_item_groups = frappe.db.get_all(
"Website Item",
fields=self.fields + ["`tabWebsite Item Group`.parent as wig_parent"],
- filters=[["Website Item Group", "item_group", "=", item_group]]
+ filters=[
+ ["Website Item Group", "item_group", "=", item_group],
+ ["published", "=", 1]
+ ]
)
return website_item_groups