Skip to content

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

Add missing task for channel migration (#18548)

Iga Karbowiakec9c4bac7638
diff --git a/saleor/celeryconf.py b/saleor/celeryconf.py
index 0384cc64c6..66488044de 100644
--- a/saleor/celeryconf.py
+++ b/saleor/celeryconf.py
@@ -38,6 +38,7 @@ app.autodiscover_tasks(
"saleor.order.migrations.tasks",
"saleor.account.migrations.tasks",
"saleor.attribute.migrations.tasks",
+ "saleor.channel.migrations.tasks",
],
related_name="saleor3_22",
)
diff --git a/saleor/channel/tasks/__init__.py b/saleor/channel/tasks/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/saleor/channel/tasks/saleor3_22.py b/saleor/channel/tasks/saleor3_22.py
new file mode 100644
index 0000000000..3a4331d827
--- /dev/null
+++ b/saleor/channel/tasks/saleor3_22.py
@@ -0,0 +1,11 @@
+from ....celeryconf import app
+from ....core.db.connection import allow_writer
+from ...models import Channel
+
+
+@allow_writer()
+def set_automatic_completion_delay_task():
+ Channel.objects.filter(automatically_complete_fully_paid_checkouts=True).update(
+ automatic_completion_delay=0
+ )