Skip to content

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

Add transactions to Channel mutations

IKarbowiakaebb25706414
diff --git a/saleor/graphql/channel/mutations.py b/saleor/graphql/channel/mutations.py
index 178ded2bce..655ba415a4 100644
--- a/saleor/graphql/channel/mutations.py
+++ b/saleor/graphql/channel/mutations.py
@@ -62,6 +62,7 @@ class ChannelCreate(ModelMutation):
return cleaned_input
@classmethod
+ @transaction.atomic
def _save_m2m(cls, info, instance, cleaned_data):
super()._save_m2m(info, instance, cleaned_data)
shipping_zones = cleaned_data.get("add_shipping_zones")
@@ -115,6 +116,7 @@ class ChannelUpdate(ModelMutation):
return cleaned_input
@classmethod
+ @transaction.atomic
def _save_m2m(cls, info, instance, cleaned_data):
super()._save_m2m(info, instance, cleaned_data)
add_shipping_zones = cleaned_data.get("add_shipping_zones")