diff --git a/event/signals.py b/event/signals.py index 040fc37..98c62cc 100644 --- a/event/signals.py +++ b/event/signals.py @@ -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(