From ebadb9078c692237e1f19213edc67763930a3746 Mon Sep 17 00:00:00 2001 From: Stefan Frauenknecht Date: Sun, 12 Oct 2014 10:55:56 +0200 Subject: [PATCH] Bugix in method get_title. Return item no for related objects. --- openslides/agenda/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openslides/agenda/models.py b/openslides/agenda/models.py index 50414209a..f86b7ce03 100644 --- a/openslides/agenda/models.py +++ b/openslides/agenda/models.py @@ -163,11 +163,12 @@ class Item(SlideMixin, AbsoluteUrlMixin, MPTTModel): """ Return the title of this item. """ + item_no = self.item_no if not self.content_object: - item_no = self.item_no return '%s %s' % (item_no, self.title) if item_no else self.title 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: raise NotImplementedError('You have to provide a get_agenda_title method on your related model.')