Makes the “reviewer’s reviews” page filter by section

This commit is contained in:
Christopher Neugebauer 2016-08-17 08:09:21 +10:00
parent 5735c7745e
commit d56bcea2e6

View file

@ -237,6 +237,7 @@ def review_list(request, section_slug, user_pk):
queryset = ProposalBase.objects.select_related("speaker__user", "result") queryset = ProposalBase.objects.select_related("speaker__user", "result")
reviewed = LatestVote.objects.filter(user__pk=user_pk).values_list("proposal", flat=True) reviewed = LatestVote.objects.filter(user__pk=user_pk).values_list("proposal", flat=True)
queryset = queryset.filter(kind__section__slug=section_slug)
queryset = queryset.filter(pk__in=reviewed) queryset = queryset.filter(pk__in=reviewed)
proposals = queryset.order_by("submitted") proposals = queryset.order_by("submitted")