Skip to content

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

Fix creating plugin permission

Damian Wysocki9a15c3bf28da
diff --git a/saleor/account/migrations/0040_auto_20200415_0443.py b/saleor/account/migrations/0040_auto_20200415_0443.py
index 3765998c99..1a3ea274ef 100644
--- a/saleor/account/migrations/0040_auto_20200415_0443.py
+++ b/saleor/account/migrations/0040_auto_20200415_0443.py
@@ -5,11 +5,10 @@ from django.db import migrations
def create_plugin_permission(apps):
- for app_config in apps.get_app_configs():
- if app_config.label == "plugins":
- app_config.models_module = True
- create_permissions(app_config, apps=apps, verbosity=0)
- app_config.models_module = None
+ app_config = apps.get_app_config("plugins")
+ app_config.models_module = True
+ create_permissions(app_config, apps=apps, verbosity=0)
+ app_config.models_module = None
def change_extension_permission_to_plugin_permission(apps, schema_editor):