Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fixed wrong references to the cart namespace
NyanKiyoshia35b7769be04
diff --git a/saleor/checkout/views/__init__.py b/saleor/checkout/views/__init__.pyindex b8054ce6d0..5c26584471 100644--- a/saleor/checkout/views/__init__.py+++ b/saleor/checkout/views/__init__.py@@ -160,7 +160,7 @@ def cart_shipping_options(request, cart):def update_cart_line(request, cart, variant_id):"""Update the line quantities."""if not request.is_ajax():- return redirect('checkout:index')+ return redirect('cart:index')variant = get_object_or_404(ProductVariant, pk=variant_id)discounts = request.discountstaxes = request.taxesdiff --git a/saleor/checkout/views/summary.py b/saleor/checkout/views/summary.pyindex 0e5385b912..7350907f8e 100644--- a/saleor/checkout/views/summary.py+++ b/saleor/checkout/views/summary.py@@ -26,7 +26,7 @@ def handle_order_placement(request, cart):discounts=request.discounts,taxes=get_taxes_for_cart(cart, request.taxes))except InsufficientStock:- return redirect('checkout:index')+ return redirect('cart:index')if not order:msg = pgettext('Checkout warning', 'Please review your checkout.')diff --git a/saleor/checkout/views/validators.py b/saleor/checkout/views/validators.pyindex 5b134225bc..cce64e511d 100644--- a/saleor/checkout/views/validators.py+++ b/saleor/checkout/views/validators.py@@ -15,7 +15,7 @@ def validate_cart(view):def func(request, cart):if cart:return view(request, cart)- return redirect('checkout:index')+ return redirect('cart:index')return funcdiff --git a/tests/test_checkout.py b/tests/test_checkout.pyindex c3859f4dd2..648b5d5351 100644--- a/tests/test_checkout.py+++ b/tests/test_checkout.py@@ -25,8 +25,8 @@ from .utils import compare_taxes, get_redirect_location@pytest.mark.parametrize('cart_length, is_shipping_required, redirect_url', [- (0, True, reverse('checkout:index')),- (0, False, reverse('checkout:index')),+ (0, True, reverse('cart:index')),+ (0, False, reverse('cart:index')),(1, True, reverse('checkout:shipping-address')),(1, False, reverse('checkout:summary'))])def test_view_checkout_index(