Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Use appropriate cart object

Adam Bogdał470bc6a21adb
diff --git a/saleor/checkout/views.py b/saleor/checkout/views.py
index 22d5111312..4bf288ffc5 100644
--- a/saleor/checkout/views.py
+++ b/saleor/checkout/views.py
@@ -2,11 +2,13 @@ from django.http.response import Http404
from django.shortcuts import redirect
from . import Checkout
+from ..cart import Cart
from ..cart.utils import has_available_products
def details(request, step):
- if not request.cart or not has_available_products(request.cart):
+ if not request.cart or not has_available_products(
+ Cart.for_session_cart(request.cart, discounts=request.discounts)):
return redirect('cart:index')
checkout = Checkout(request)
if not step: