From f50b41188de9af58f596dbad33d650716908b3f2 Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Fri, 11 Mar 2022 22:38:15 -0600 Subject: [PATCH] Fix a bug --- judge/views/problem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/judge/views/problem.py b/judge/views/problem.py index 65ab3bf..9149511 100644 --- a/judge/views/problem.py +++ b/judge/views/problem.py @@ -226,11 +226,11 @@ 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['has_votes'] = len(all_votes) > 0 context['max_possible_vote'] = 600 context['min_possible_vote'] = 100 return context