Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Filter shipment options for country or rest of the world
Mira Szewczykad8beea63df0
diff --git a/saleor/cart/forms.py b/saleor/cart/forms.pyindex 03bf5a43af..cec6659cec 100644--- a/saleor/cart/forms.py+++ b/saleor/cart/forms.py@@ -1,6 +1,7 @@from __future__ import unicode_literalsfrom django import forms+from django.db.models import Qfrom django.core.exceptions import ObjectDoesNotExist, NON_FIELD_ERRORSfrom django.utils.translation import pgettext_lazy, ugettext_lazyfrom satchless.item import InsufficientStock@@ -121,4 +122,4 @@ class CountryForm(forms.Form):def get_shipment_options(self):code = self.cleaned_data['country']return ShippingMethodCountry.objects.filter(- country_code=code).order_by('price')+ Q(country_code=code) | Q(country_code='')).order_by('price')