Uses election_detail for vote form

This commit is contained in:
2016-12-22 01:28:51 +01:00
parent 938e2ce0a9
commit 1f60fbd484
4 changed files with 26 additions and 15 deletions

View File

@ -56,7 +56,7 @@ class Role(models.Model):
max_choice = models.IntegerField(_('max choice'), default=1)
def user_has_voted(self, user):
return not self.has_voted.filter(id=user.id).exists()
return self.has_voted.filter(id=user.id).exists()
def __str__(self):
return ("%s : %s") % (self.election.title, self.title)