diff --git a/loops/browser/concept.py b/loops/browser/concept.py index d5c7325..0be2452 100644 --- a/loops/browser/concept.py +++ b/loops/browser/concept.py @@ -445,7 +445,7 @@ class ConceptView(BaseView): def parents(self): rels = sorted(self.context.getParentRelations(), - key=(lambda x: x.first.title and x.first.title.lower())) + key=(lambda x: x.first.title and x.first.title.lower() or '')) for r in rels: yield self.childViewFactory(r, self.request) diff --git a/loops/concept.py b/loops/concept.py index 53fd9ad..bae121d 100644 --- a/loops/concept.py +++ b/loops/concept.py @@ -204,7 +204,7 @@ class Concept(Contained, Persistent): predicates = predicates is None and ['c*'] or predicates relationships = [ConceptRelation(None, self, p) for p in predicates] if sort == 'default': - sort = lambda x: (x.first.title and x.first.title.lower()) + sort = lambda x: (x.first.title and x.first.title.lower() or '') rels = (r for r in getRelations(parent, self, relationships=relationships, usePredicateIndex=usePredicateIndex) if canListObject(r.first, noSecurityCheck))