Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove redundant filters
George Lubaretsiaa4dc9bc2f3b
diff --git a/saleor/product/models/base_products.py b/saleor/product/models/base_products.pyindex 8b4af2a680..27c458e12d 100644--- a/saleor/product/models/base_products.py+++ b/saleor/product/models/base_products.py@@ -66,9 +66,7 @@ class Product(Subtyped, ItemRange):def get_products_from_collection(self):return Product.objects.filter(- collection=self.collection,- collection__isnull=False- ).exclude(collection__iexact='') if self.collection else None+ collection=self.collection) if self.collection else Nonedef __iter__(self):return iter(self.variants.all())