diff --git a/vendor/symposion/reviews/views.py b/vendor/symposion/reviews/views.py index 38815309..294913d6 100644 --- a/vendor/symposion/reviews/views.py +++ b/vendor/symposion/reviews/views.py @@ -1,4 +1,5 @@ import csv +import math import random from django.contrib.auth.decorators import login_required @@ -226,8 +227,7 @@ def review_random_proposal(request, section_slug): proposals = list(proposals) proposals.sort(key=lambda proposal: proposal.total_votes) # The first half is the median or less. - # The +1 means we round _up_. - proposals = proposals[:(len(proposals) + 1) / 2] + proposals = proposals[:math.ceil(len(proposals) / 2)] # Realistically, there shouldn't be all that many proposals to choose # from, so this should be cheap.