Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix voucher shipping for 'Any Country' case
Artur Smęt9003c8ff54f6
diff --git a/saleor/discount/test_discounts.py b/saleor/discount/test_discounts.pyindex f0c5620816..bfa6291bd0 100644--- a/saleor/discount/test_discounts.py+++ b/saleor/discount/test_discounts.py@@ -98,6 +98,7 @@ def test_value_voucher_checkout_discount_not_applicable(settings):'shipping_cost, shipping_country_code, discount_value, discount_type, apply_to, expected_value', [ # noqa(10, None, 50, Voucher.DISCOUNT_VALUE_PERCENTAGE, None, 5),(10, None, 20, Voucher.DISCOUNT_VALUE_FIXED, None, 10),+ (5, 'PL', 5, Voucher.DISCOUNT_VALUE_FIXED, None, 5),(5, 'PL', 5, Voucher.DISCOUNT_VALUE_FIXED, 'PL', 5)])def test_shipping_voucher_checkout_discount(settings, shipping_cost,shipping_country_code,diff --git a/saleor/shipping/models.py b/saleor/shipping/models.pyindex 7dd2d1f405..0fa0fb0b7c 100644--- a/saleor/shipping/models.py+++ b/saleor/shipping/models.py@@ -61,7 +61,7 @@ class ShippingMethodCountryQueryset(models.QuerySet):@python_2_unicode_compatibleclass ShippingMethodCountry(models.Model):- ANY_COUNTRY = ''+ ANY_COUNTRY = NoneCOUNTRY_CODE_CHOICES = [(ANY_COUNTRY, _('Any country'))] + list(COUNTRIES.items())country_code = models.CharField(