Ignore withdrawn proposals for random choice

This commit is contained in:
Joel Addison 2020-11-19 12:20:49 +00:00
parent b20dc75ea6
commit ac57053ecf

View file

@ -228,6 +228,8 @@ def review_random_proposal(request, section_slug):
queryset = ProposalBase.objects.filter(kind__section=section.section) queryset = ProposalBase.objects.filter(kind__section=section.section)
# Remove ones already reviewed # Remove ones already reviewed
queryset = queryset.exclude(reviews__user=request.user) queryset = queryset.exclude(reviews__user=request.user)
# Remove withdrawn talks
queryset = queryset.exclude(cancelled=True)
# Remove talks the reviewer can't vote on -- their own. # Remove talks the reviewer can't vote on -- their own.
queryset = queryset.exclude(speaker__user=request.user) queryset = queryset.exclude(speaker__user=request.user)
queryset = queryset.exclude(additional_speakers__user=request.user) queryset = queryset.exclude(additional_speakers__user=request.user)