Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Store cart in session only when it was modified
Artur Smęt6464028097b1
diff --git a/saleor/cart/middleware.py b/saleor/cart/middleware.pyindex 18a17cd03d..a4ea4083fd 100644--- a/saleor/cart/middleware.py+++ b/saleor/cart/middleware.py@@ -17,6 +17,6 @@ class CartMiddleware(object):setattr(request, 'cart', cart)def process_response(self, request, response):- if hasattr(request, 'cart'):+ if hasattr(request, 'cart') and request.cart.modified:request.session[CART_SESSION_KEY] = request.cart.for_storage()return response