Fixed bug of numbering view when there are orga items. Renamed toRoman to to_roman.

This commit is contained in:
Norman Jäckel 2014-05-04 13:41:55 +02:00
parent f8bd4b0d86
commit d638d5b7e2
2 changed files with 5 additions and 3 deletions

View File

@ -20,7 +20,7 @@ from openslides.projector.models import SlideMixin
from openslides.utils.exceptions import OpenSlidesError
from openslides.utils.models import AbsoluteUrlMixin
from openslides.utils.person.models import PersonField
from openslides.utils.utils import toRoman
from openslides.utils.utils import to_roman
class Item(SlideMixin, AbsoluteUrlMixin, MPTTModel):
@ -319,9 +319,11 @@ class Item(SlideMixin, AbsoluteUrlMixin, MPTTModel):
if config['agenda_numeral_system'] == 'arabic':
return str(self._calc_sibling_no())
else: # config['agenda_numeral_system'] == 'roman'
return toRoman(self._calc_sibling_no())
return to_roman(self._calc_sibling_no())
else:
return '%s.%s' % (self.parent.calc_item_no(), self._calc_sibling_no())
else:
return ''
def _calc_sibling_no(self):
"""

View File

@ -74,7 +74,7 @@ def int_or_none(var):
return None
def toRoman(number):
def to_roman(number):
"""
Converts an arabic number within range from 1 to 4999 to the corresponding roman number.
Returns None on error conditions.