From c5015f4448388c2745b935a36f0378874e7b0fdc Mon Sep 17 00:00:00 2001 From: imperosol Date: Mon, 26 Oct 2026 13:24:16 +0100 Subject: [PATCH] fix: add missing permission in populate --- core/management/commands/populate.py | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/core/management/commands/populate.py b/core/management/commands/populate.py index de803d66..d3c880c7 100644 --- a/core/management/commands/populate.py +++ b/core/management/commands/populate.py @@ -864,7 +864,11 @@ class Command(BaseCommand): subscribers = Group.objects.create(name="Cotisants") subscribers.permissions.add( - *list(perms.filter(codename__in=["add_news", "add_uecomment"])) + *list( + perms.filter( + codename__in=["add_news", "add_uecomment", "add_self_timetable"] + ) + ) ) old_subscribers = Group.objects.create(name="Anciens cotisants") old_subscribers.permissions.add( @@ -893,18 +897,16 @@ class Command(BaseCommand): accounting_admin.permissions.add( *list( perms.filter( - Q( - codename__in=[ - "view_customer", - "view_product", - "change_product", - "add_product", - "view_producttype", - "change_producttype", - "add_producttype", - "delete_selling", - ] - ) + codename__in=[ + "view_customer", + "view_product", + "change_product", + "add_product", + "view_producttype", + "change_producttype", + "add_producttype", + "delete_selling", + ] ).values_list("pk", flat=True) ) )