Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add prefetch related in lookup
Mira2080a0c62210
diff --git a/saleor/product/utils.py b/saleor/product/utils.pyindex be66e38ba7..3ee2cd0bac 100644--- a/saleor/product/utils.py+++ b/saleor/product/utils.py@@ -86,4 +86,6 @@ def handle_cart_form(request, product, create_cart=False):def products_for_cart(user):products = products_visible_to_user(user)+ products = products.prefetch_related(+ 'variants', 'variants__variant_images__image')return products