X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/357027375ff8867f42ca34bcbfb5a78b5b185fc3..7d8e15808814aedbade3712a76d658e8e2adf73c:/src/polls/models.py?ds=sidebyside diff --git a/src/polls/models.py b/src/polls/models.py index 8e356683e..bfc36394b 100644 --- a/src/polls/models.py +++ b/src/polls/models.py @@ -49,7 +49,7 @@ class PollItem(models.Model): class Meta: verbose_name = _('vote item') verbose_name_plural = _('vote items') - + def __unicode__(self): return self.content + ' @ ' + unicode(self.poll) @@ -58,7 +58,7 @@ class PollItem(models.Model): return (float(self.vote_count) / self.poll.vote_count) * 100 if self.poll.vote_count else 0 def vote(self, session): - self.vote_count = self.vote_count + 1 + self.vote_count += 1 self.save() session.setdefault(USED_POLLS_KEY, []).append(self.poll.id) session.save()