Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove redundant function
Mira Szewczykb36d26c9cd97
diff --git a/saleor/cart/views.py b/saleor/cart/views.pyindex ae3e6c826c..513b15cfe1 100644--- a/saleor/cart/views.py+++ b/saleor/cart/views.py@@ -9,7 +9,6 @@ from django.template.response import TemplateResponsefrom . import decoratorsfrom ..core.utils import to_local_currency, get_default_countryfrom ..product.models import ProductVariant-from ..shipping.utils import assign_shipment_to_countryfrom .forms import ReplaceCartLineForm, CountryFormfrom .models import Cartfrom .utils import check_product_availability_and_warn@@ -33,7 +32,6 @@ def index(request, cart):cart_total = Nonelocal_cart_total = None- shipment_by_country = assign_shipment_to_country()if cart:cart_total = cart.get_total(discounts=discounts)local_cart_total = to_local_currency(cart_total, request.currency)@@ -48,8 +46,7 @@ def index(request, cart):'cart_lines': cart_lines,'cart_total': cart_total,'local_cart_total': local_cart_total,- 'country_form': country_form,- 'shipment_by_country': shipment_by_country})+ 'country_form': country_form})@decorators.get_or_empty_db_cart()diff --git a/saleor/shipping/utils.py b/saleor/shipping/utils.pydeleted file mode 100644index 0798b69400..0000000000--- a/saleor/shipping/utils.py+++ /dev/null@@ -1,9 +0,0 @@-from .models import ShippingMethodCountry, COUNTRY_CODE_CHOICES---def assign_shipment_to_country():- shippments = {}- for code in COUNTRY_CODE_CHOICES:- shippments[code[0]] = ShippingMethodCountry.objects.select_related(- 'shipping_method').filter(country_code=code)- return shippments