undocumentet poll results
This commit is contained in:
parent
475b7a1ffe
commit
7be90c89c7
@ -125,6 +125,8 @@ class Option(models.Model):
|
||||
def yes(self):
|
||||
if self.voteyes == -1:
|
||||
return _('majority')
|
||||
if self.voteno == -2:
|
||||
return _('undocumented')
|
||||
if self.voteyes:
|
||||
return self.voteyes
|
||||
return '0'
|
||||
@ -133,6 +135,8 @@ class Option(models.Model):
|
||||
def no(self):
|
||||
if self.voteno == -1:
|
||||
return _('majority')
|
||||
if self.voteno == -2:
|
||||
return _('undocumented')
|
||||
if self.voteno:
|
||||
return self.voteno
|
||||
return '0'
|
||||
@ -141,6 +145,8 @@ class Option(models.Model):
|
||||
def undesided(self):
|
||||
if self.voteundesided == -1:
|
||||
return _('majority')
|
||||
if self.voteno == -2:
|
||||
return _('undocumented')
|
||||
if self.voteundesided:
|
||||
return self.voteundesided
|
||||
return '0'
|
||||
@ -156,10 +162,6 @@ class Option(models.Model):
|
||||
return None
|
||||
|
||||
def __unicode__(self):
|
||||
if self.text != "" and self.text is not None:
|
||||
return self.text
|
||||
if self.user is not None:
|
||||
return unicode(self.user)
|
||||
if self.application is not None:
|
||||
return unicode(self.application)
|
||||
if self.value:
|
||||
return self.value
|
||||
return _("No options")
|
||||
|
Loading…
Reference in New Issue
Block a user