Add filter to permissions
This commit is contained in:
parent
910d8fe9c0
commit
25df34e57e
1 changed files with 3 additions and 1 deletions
|
@ -17,7 +17,9 @@ def create_groups_for_event(sender, **kwargs):
|
|||
event=event
|
||||
)
|
||||
|
||||
for perm in Permission.objects.filter(codename__contains="event_"):
|
||||
for perm in Permission.objects.filter(
|
||||
content_type=ContentType.objects.get_for_model(Event),
|
||||
codename__contains="event_"):
|
||||
assign_perm(perm.codename, orgas, event)
|
||||
|
||||
GEGroup.objects.create(
|
||||
|
|
Loading…
Reference in a new issue