Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Filter shipment options for country or rest of the world

Mira Szewczykad8beea63df0
diff --git a/saleor/cart/forms.py b/saleor/cart/forms.py
index 03bf5a43af..cec6659cec 100644
--- a/saleor/cart/forms.py
+++ b/saleor/cart/forms.py
@@ -1,6 +1,7 @@
from __future__ import unicode_literals
from django import forms
+from django.db.models import Q
from django.core.exceptions import ObjectDoesNotExist, NON_FIELD_ERRORS
from django.utils.translation import pgettext_lazy, ugettext_lazy
from 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')