Fix groupes

This commit is contained in:
Jean-Marie Favreau 2024-04-17 12:15:49 +02:00
parent 4aed4889a7
commit 8d8fa39c93
1 changed files with 1 additions and 1 deletions

View File

@ -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)