Fix exception in polls with special values (fallout from translation fix)
This commit is contained in:
parent
e005863336
commit
182f20308b
@ -40,7 +40,7 @@ class Vote(models.Model):
|
|||||||
return print_value(self.weight)
|
return print_value(self.weight)
|
||||||
|
|
||||||
def get_value(self):
|
def get_value(self):
|
||||||
return _(self.value)
|
return unicode(_(self.value))
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return self.get_weight()
|
return self.get_weight()
|
||||||
@ -189,8 +189,8 @@ class BasePoll(models.Model, SlideMixin):
|
|||||||
|
|
||||||
def print_value(value):
|
def print_value(value):
|
||||||
if value == -1:
|
if value == -1:
|
||||||
return _('majority')
|
value = _('majority')
|
||||||
elif value == -2:
|
elif value == -2:
|
||||||
return _('undocumented')
|
value = _('undocumented')
|
||||||
return unicode(value)
|
return unicode(value)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user