Skip to content

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

Warehouse do not need shipping zone

Mira Szewczyk0dd566e34f34
diff --git a/saleor/warehouse/migrations/0001_initial.py b/saleor/warehouse/migrations/0001_initial.py
index 901e69a3b5..b63d8e0fa6 100644
--- a/saleor/warehouse/migrations/0001_initial.py
+++ b/saleor/warehouse/migrations/0001_initial.py
@@ -1,4 +1,4 @@
-# Generated by Django 2.2.6 on 2019-11-12 10:56
+# Generated by Django 2.2.6 on 2019-11-13 13:08
import uuid
@@ -11,8 +11,8 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
- ("account", "0034_service_account_token"),
("shipping", "0017_django_price_2"),
+ ("account", "0034_service_account_token"),
]
operations = [
@@ -49,7 +49,10 @@ class Migration(migrations.Migration):
to="account.Address",
),
),
- ("shipping_zones", models.ManyToManyField(to="shipping.ShippingZone")),
+ (
+ "shipping_zones",
+ models.ManyToManyField(blank=True, to="shipping.ShippingZone"),
+ ),
],
options={
"ordering": ("-name",),
diff --git a/saleor/warehouse/models.py b/saleor/warehouse/models.py
index 9c7a03e468..106f5cbc62 100644
--- a/saleor/warehouse/models.py
+++ b/saleor/warehouse/models.py
@@ -22,7 +22,7 @@ class Warehouse(models.Model):
max_length=100,
)
- shipping_zones = models.ManyToManyField(ShippingZone)
+ shipping_zones = models.ManyToManyField(ShippingZone, blank=True)
address = models.ForeignKey(Address, on_delete=models.CASCADE)
email = models.EmailField(