U max počtu bodů nezobrazuj deset. část, je-li 0
This commit is contained in:
parent
6a755c2b88
commit
ed37f16035
1 changed files with 9 additions and 1 deletions
|
@ -477,7 +477,15 @@ class Problem(SeminarModelBase):
|
|||
return reverse('admin:seminar_problemnavrh_change', args=(self.id, ))
|
||||
|
||||
def body_v_zavorce(self):
|
||||
return u"({}\u2009b)".format(self.body) if self.body else ""
|
||||
"""Vrať string s body v závorce jsou-li u problému vyplněné, jinak ''
|
||||
|
||||
Je-li desetinná část nulová, nezobrazuj ji.
|
||||
"""
|
||||
pocet_bodu = None
|
||||
if self.body:
|
||||
b = self.body
|
||||
pocet_bodu = int(b) if int(b) == b else b
|
||||
return u"({}\u2009b)".format(pocet_bodu) if self.body else ""
|
||||
|
||||
|
||||
@reversion.register(ignore_duplicate_revisions=True)
|
||||
|
|
Loading…
Reference in a new issue