Bugix in method get_title. Return item no for related objects.
This commit is contained in:
parent
9b381b712e
commit
ebadb9078c
@ -163,11 +163,12 @@ class Item(SlideMixin, AbsoluteUrlMixin, MPTTModel):
|
|||||||
"""
|
"""
|
||||||
Return the title of this item.
|
Return the title of this item.
|
||||||
"""
|
"""
|
||||||
if not self.content_object:
|
|
||||||
item_no = self.item_no
|
item_no = self.item_no
|
||||||
|
if not self.content_object:
|
||||||
return '%s %s' % (item_no, self.title) if item_no else self.title
|
return '%s %s' % (item_no, self.title) if item_no else self.title
|
||||||
try:
|
try:
|
||||||
return self.content_object.get_agenda_title()
|
agenda_title = self.content_object.get_agenda_title()
|
||||||
|
return '%s %s' % (item_no, agenda_title) if item_no else agenda_title
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
raise NotImplementedError('You have to provide a get_agenda_title method on your related model.')
|
raise NotImplementedError('You have to provide a get_agenda_title method on your related model.')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user