diff options
Diffstat (limited to 'polls/models.py')
| -rw-r--r-- | polls/models.py | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/polls/models.py b/polls/models.py index 4ca5036..4a7f584 100644 --- a/polls/models.py +++ b/polls/models.py @@ -128,7 +128,7 @@ class Choice(models.Model):      def getSum(self):          '''Get the sum of votes for this choice'''          sum = 0 -        for vote in Vote.objects.filter(choice=self): +        for vote in Vote.objects.filter(choice=self, value__isnull=False):              sum += vote.value          return sum  | 
