From 67b58c39851714548e9079e04b0d801289c3f3d9 Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Fri, 20 May 2022 10:06:16 -0700 Subject: [PATCH] Restrict exclude coach for to assigned coaches only. --- kolibri/core/auth/api.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/kolibri/core/auth/api.py b/kolibri/core/auth/api.py index afa30e0adfe..53781291c03 100644 --- a/kolibri/core/auth/api.py +++ b/kolibri/core/auth/api.py @@ -238,11 +238,6 @@ def filter_exclude_member_of(self, queryset, name, value): def filter_exclude_coach_for(self, queryset, name, value): return queryset.exclude( Q(roles__in=Role.objects.filter(kind=role_kinds.COACH, collection=value)) - | Q( - roles__in=Role.objects.filter( - kind=role_kinds.COACH, collection_id=value.parent_id - ) - ) ) def filter_exclude_user_type(self, queryset, name, value):