fix: Exclude unpublished items while fetching items from other item groups

This commit is contained in:
marination 2022-01-10 13:38:54 +05:30
parent 28e0c1acdc
commit 20c71edc84

View File

@ -196,7 +196,10 @@ class ProductQuery:
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