diff --git a/openslides/poll/models.py b/openslides/poll/models.py index a5beac578..7f8a72ff2 100644 --- a/openslides/poll/models.py +++ b/openslides/poll/models.py @@ -82,10 +82,9 @@ class CountVotesCast(models.Model): return print_value(self.votescast) def percent_base(self): - try: + if self.votescast > 0: return 100 / float(self.votescast) - except TypeError: - return 0 + return 0 class Meta: abstract = True