Skip to content
Snippets Groups Projects
Commit 37e17271 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Add in a way to filter out determined applications

parent 5e14ea59
No related branches found
No related tags found
No related merge requests found
......@@ -37,10 +37,20 @@ class SubmissionsFilter(filters.FilterSet):
# TODO replace with better call to Round and Lab base class
round = RoundLabFilter(queryset=Page.objects.type(SubmittableStreamForm))
status = filters.MultipleChoiceFilter(choices=PHASES)
active = filters.BooleanFilter(method='filter_active')
class Meta:
model = ApplicationSubmission
fields = ('status', 'round')
fields = ('status', 'round', 'active')
def filter_active(self, value):
if value is None:
return qs
if value:
return qs.active()
else:
return qs.inactive()
class SubmissionList(generics.ListAPIView):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment