diff --git a/openslides/assignment/models.py b/openslides/assignment/models.py index 9d2cf8814..4b86b75cf 100644 --- a/openslides/assignment/models.py +++ b/openslides/assignment/models.py @@ -227,11 +227,12 @@ class Assignment(models.Model, SlideMixin): """ return the slide dict """ + polls = self.poll_set data = super(Assignment, self).slide() data['assignment'] = self data['title'] = self.name - data['polls_available'] = self.poll_set.exists() - data['polls'] = self.poll_set.filter(published=True) + data['some_polls_available'] = polls.exists() + data['polls'] = polls.filter(published=True) data['vote_results'] = self.vote_results(only_published=True) data['assignment_publish_winner_results_only'] = \ config['assignment_publish_winner_results_only'] diff --git a/openslides/assignment/templates/projector/Assignment.html b/openslides/assignment/templates/projector/Assignment.html index 181597a9f..8cf59860c 100644 --- a/openslides/assignment/templates/projector/Assignment.html +++ b/openslides/assignment/templates/projector/Assignment.html @@ -122,7 +122,7 @@ - {% elif polls_available %} + {% elif some_polls_available %} {% trans "Vote results are not published yet." %} {% elif assignment.candidates %} {% trans "No ballots available." %}