Skip to content

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

Channel inital migration add channel permission to all groups

Damian W9596b9d549c9
diff --git a/saleor/channel/migrations/0001_initial.py b/saleor/channel/migrations/0001_initial.py
index 300efb1bff..6e2a6bfe0b 100644
--- a/saleor/channel/migrations/0001_initial.py
+++ b/saleor/channel/migrations/0001_initial.py
@@ -14,9 +14,8 @@ def assing_permissions(apps, schema_editor):
manage_channels = Permission.objects.filter(
codename="manage_channels", content_type__app_label="channel"
).first()
- full_access = Group.objects.filter(name="Full Access").first()
- if full_access:
- full_access.permissions.add(manage_channels)
+ for group in Group.objects.iterator():
+ group.permissions.add(manage_channels)
def get_default_currency(Checkout, Order, Product, ShippingMethod, Voucher):