From: Guillaume Pellerin Date: Fri, 26 Jan 2018 08:43:40 +0000 (+0100) Subject: Fix no script type X-Git-Tag: 1.2~8^2~1 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=19b7f04b7b06c4868664de63e3522da812510b9b;p=teleforma.git Fix no script type --- diff --git a/teleforma/exam/models.py b/teleforma/exam/models.py index 338a3140..07c2d0a5 100644 --- a/teleforma/exam/models.py +++ b/teleforma/exam/models.py @@ -262,7 +262,10 @@ class Script(BaseResource): @property def title(self): - title = [self.course.title, self.type.name, _("Session") + ' ' + self.session, unicode(self.date_added)] + if self.type.name: + title = [self.course.title, self.type.name, _("Session") + ' ' + self.session, unicode(self.date_added)] + else: + title = [self.course.title, _("Session") + ' ' + self.session, unicode(self.date_added)] if self.author: title.append(unicode(self.author.first_name) + ' ' + unicode(self.author.last_name)) return ' - '.join(title)