Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix published_with_variants ProductsQueryset
Przemysław Łada49cc14a55a82
diff --git a/saleor/product/models.py b/saleor/product/models.pyindex 13682116f9..9a38ebe209 100644--- a/saleor/product/models.py+++ b/saleor/product/models.py@@ -125,7 +125,7 @@ class ProductsQueryset(PublishedQuerySet):def published_with_variants(self):published = self.published()- return published.filter(variants__isnull=False)+ return published.filter(variants__isnull=False).distinct()def visible_to_user(self, user):if self.user_has_access_to_all(user):