From 2b29428e32832861f8ebe650dcea3201edf07f16 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Tue, 8 Nov 2011 13:37:36 +0100 Subject: [PATCH] more fault-tolerance: avoid errors when title or description is None --- concept.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/concept.py b/concept.py index 14367ea..02e7bea 100644 --- a/concept.py +++ b/concept.py @@ -429,6 +429,8 @@ class IndexAttributes(object): if self.adaptedIndexAttributes is not None: return self.adaptedIndexAttributes.text() description = self.context.description + if description is None: + description = u'' if isinstance(description, I18NValue): description = ' '.join(description.values()) actx = self.adapted @@ -441,6 +443,8 @@ class IndexAttributes(object): def title(self): context = self.context title = context.title + if title is None: + title = u'' if isinstance(title, I18NValue): title = ' '.join(title.values()) return ' '.join((getName(context), title)).strip()