fix sort concept relations (Py3): use '' instead of None
This commit is contained in:
parent
aa0443d0b5
commit
ed5e560ba4
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue