Fixed bug of numbering view when there are orga items. Renamed toRoman to to_roman.
This commit is contained in:
parent
f8bd4b0d86
commit
d638d5b7e2
@ -20,7 +20,7 @@ from openslides.projector.models import SlideMixin
|
|||||||
from openslides.utils.exceptions import OpenSlidesError
|
from openslides.utils.exceptions import OpenSlidesError
|
||||||
from openslides.utils.models import AbsoluteUrlMixin
|
from openslides.utils.models import AbsoluteUrlMixin
|
||||||
from openslides.utils.person.models import PersonField
|
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):
|
class Item(SlideMixin, AbsoluteUrlMixin, MPTTModel):
|
||||||
@ -319,9 +319,11 @@ class Item(SlideMixin, AbsoluteUrlMixin, MPTTModel):
|
|||||||
if config['agenda_numeral_system'] == 'arabic':
|
if config['agenda_numeral_system'] == 'arabic':
|
||||||
return str(self._calc_sibling_no())
|
return str(self._calc_sibling_no())
|
||||||
else: # config['agenda_numeral_system'] == 'roman'
|
else: # config['agenda_numeral_system'] == 'roman'
|
||||||
return toRoman(self._calc_sibling_no())
|
return to_roman(self._calc_sibling_no())
|
||||||
else:
|
else:
|
||||||
return '%s.%s' % (self.parent.calc_item_no(), self._calc_sibling_no())
|
return '%s.%s' % (self.parent.calc_item_no(), self._calc_sibling_no())
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
|
|
||||||
def _calc_sibling_no(self):
|
def _calc_sibling_no(self):
|
||||||
"""
|
"""
|
||||||
|
@ -74,7 +74,7 @@ def int_or_none(var):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
def toRoman(number):
|
def to_roman(number):
|
||||||
"""
|
"""
|
||||||
Converts an arabic number within range from 1 to 4999 to the corresponding roman number.
|
Converts an arabic number within range from 1 to 4999 to the corresponding roman number.
|
||||||
Returns None on error conditions.
|
Returns None on error conditions.
|
||||||
|
Loading…
Reference in New Issue
Block a user