Omit leading zero in method item_no if no agenda prefix is given.

This commit is contained in:
Stefan Frauenknecht 2014-10-10 21:30:22 +02:00
parent c6586c2c70
commit 276f76d320

View File

@ -304,10 +304,12 @@ class Item(SlideMixin, AbsoluteUrlMixin, MPTTModel):
@property
def item_no(self):
item_no = None
if self.item_number:
item_no = '%s %s' % (config['agenda_number_prefix'], self.item_number)
else:
item_no = None
if config['agenda_number_prefix']:
item_no = '%s %s' % (config['agenda_number_prefix'], self.item_number)
else:
item_no = str(self.item_number)
return item_no
def calc_item_no(self):