Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Rename get_country_codes to get_mapped_country_codes_from_search
michal5abe62a06690
diff --git a/saleor/core/utils/filters.py b/saleor/core/utils/filters.pyindex 163938d4dd..121054f66f 100644--- a/saleor/core/utils/filters.py+++ b/saleor/core/utils/filters.py@@ -28,13 +28,13 @@ def filter_by_customer(queryset, name, value):def filter_by_location(queryset, name, value):q = Q(default_billing_address__city__icontains=value)q |= Q(default_billing_address__country__icontains=value)- country_codes = get_mapped_country_codes_from_string(value)+ country_codes = get_mapped_country_codes_from_search(value)for code in country_codes:q |= Q(default_billing_address__country__icontains=code)return queryset.filter(q)-def get_mapped_country_codes_from_string(value):+def get_mapped_country_codes_from_search(value):country_codes = []for code, country in dict(countries).items():if value.lower() in country.lower():