From 0f488e7a127b82a1a847d8e00cc030fa61038510 Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Mon, 5 Sep 2016 10:42:50 +1000 Subject: [PATCH] Makes TeamMemberCondition work --- registrasion/controllers/conditions.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/registrasion/controllers/conditions.py b/registrasion/controllers/conditions.py index 31413d27..e9efb625 100644 --- a/registrasion/controllers/conditions.py +++ b/registrasion/controllers/conditions.py @@ -330,8 +330,10 @@ class SpeakerConditionController(IsMetByFilter, ConditionController): class GroupMemberConditionController(IsMetByFilter, ConditionController): @classmethod - def pre_filter(self, queryset, user): - ''' Returns all of the items from queryset which are enabled by a user - being member of a Django Auth Group. ''' + def pre_filter(self, conditions, user): + ''' Returns all of the items from conditions which are enabled by a + user being member of a Django Auth Group. ''' - return queryset + return conditions.filter( + group=user.groups.all(), + )