Fix a bug

This commit is contained in:
cuom1999 2022-03-11 22:38:15 -06:00
parent cb7e4559e4
commit f50b41188d

View file

@ -226,10 +226,10 @@ class ProblemDetail(ProblemMixin, SolvedProblemMixin, DetailView):
else:
context['vote'] = None
context['has_votes'] = False
if user.is_superuser:
all_votes = list(self.object.problem_points_votes.order_by('points').values_list('points', flat=True))
context['all_votes'] = all_votes
context['has_votes'] = len(all_votes) > 0
context['max_possible_vote'] = 600
context['min_possible_vote'] = 100