Passes first two tests
This commit is contained in:
parent
0b306fd59e
commit
04eefa4e0e
1 changed files with 13 additions and 2 deletions
|
@ -310,6 +310,17 @@ class SpeakerConditionController(IsMetByFilter, ConditionController):
|
||||||
''' Returns all of the items from queryset which are enabled by a user
|
''' Returns all of the items from queryset which are enabled by a user
|
||||||
being a presenter or copresenter of a proposal. '''
|
being a presenter or copresenter of a proposal. '''
|
||||||
|
|
||||||
# User is a presenter
|
u = user
|
||||||
|
|
||||||
return queryset.filter(proposal_kind__section__presentations__speaker__user=user)
|
# User is a presenter
|
||||||
|
user_is_presenter = Q(
|
||||||
|
is_presenter=True,
|
||||||
|
proposal_kind__section__presentations__speaker__user=u,
|
||||||
|
)
|
||||||
|
# User is a copresenter
|
||||||
|
user_is_copresenter = Q(
|
||||||
|
is_copresenter=True,
|
||||||
|
proposal_kind__section__presentations__additional_speakers__user=u,
|
||||||
|
)
|
||||||
|
|
||||||
|
return queryset.filter(user_is_presenter | user_is_copresenter)
|
||||||
|
|
Loading…
Reference in a new issue