From 8d8fa39c9381e895ed22a5cb8d5d363546a95979 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Wed, 17 Apr 2024 12:15:49 +0200 Subject: [PATCH] Fix groupes --- src/agenda_culturel/migrations/0048_auto_20240417_1212.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agenda_culturel/migrations/0048_auto_20240417_1212.py b/src/agenda_culturel/migrations/0048_auto_20240417_1212.py index da0ece8..a1f0eb3 100644 --- a/src/agenda_culturel/migrations/0048_auto_20240417_1212.py +++ b/src/agenda_culturel/migrations/0048_auto_20240417_1212.py @@ -14,7 +14,7 @@ def update_groups_permissions(apps, schema_editor): all_perms = Permission.objects.all() # set permissions for moderators - editor_perms = [i for i in all_perms if i.content_type.app_label == 'agenda_culturel' and i.content_type.model in ['event', 'staticcontent']] + editor_perms = [i for i in all_perms if i.content_type.app_label == 'agenda_culturel' and i.content_type.model == 'staticcontent'] Group.objects.get(name="Static content editor").permissions.add(*editor_perms)