Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix for taking currency in wrong way in checkout init
Maciej Korycinski4e5e83d845ba
diff --git a/saleor/checkout/views/__init__.py b/saleor/checkout/views/__init__.pyindex e21f296442..3cdfc250ad 100644--- a/saleor/checkout/views/__init__.py+++ b/saleor/checkout/views/__init__.py@@ -1,4 +1,5 @@"""Checkout related views."""+from django.conf import settingsfrom django.http import JsonResponsefrom django.shortcuts import get_object_or_404, redirect, renderfrom django.template.response import TemplateResponse@@ -219,8 +220,7 @@ def update_checkout_line(request, checkout, variant_id):checkout.refresh_from_db()# Refresh obj from db and confirm that checkout still has this linecheckout_line = checkout.lines.filter(variant_id=variant_id).first()- currency = checkout.get_total().currency- line_total = zero_taxed_money(currency)+ line_total = zero_taxed_money(currency=settings.DEFAULT_CURRENCY)if checkout_line:line_total = tax_interface.calculate_checkout_line_total(checkout_line, discounts