Fix a bug
This commit is contained in:
parent
cb7e4559e4
commit
f50b41188d
1 changed files with 2 additions and 2 deletions
|
@ -226,10 +226,10 @@ class ProblemDetail(ProblemMixin, SolvedProblemMixin, DetailView):
|
||||||
else:
|
else:
|
||||||
context['vote'] = None
|
context['vote'] = None
|
||||||
|
|
||||||
|
context['has_votes'] = False
|
||||||
if user.is_superuser:
|
if user.is_superuser:
|
||||||
all_votes = list(self.object.problem_points_votes.order_by('points').values_list('points', flat=True))
|
all_votes = list(self.object.problem_points_votes.order_by('points').values_list('points', flat=True))
|
||||||
context['all_votes'] = all_votes
|
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['max_possible_vote'] = 600
|
||||||
context['min_possible_vote'] = 100
|
context['min_possible_vote'] = 100
|
||||||
|
|
Loading…
Reference in a new issue