Python3 fix: avoid None when sorting strings
This commit is contained in:
parent
bbc277e81d
commit
0de7ef2550
1 changed files with 2 additions and 1 deletions
|
@ -182,7 +182,8 @@ class Concept(Contained, Persistent):
|
|||
predicates = predicates is None and ['c*'] or predicates
|
||||
relationships = [ConceptRelation(self, None, p) for p in predicates]
|
||||
if sort == 'default':
|
||||
sort = lambda x: (x.order, (x.second.title and x.second.title.lower()))
|
||||
sort = lambda x: (x.order or '',
|
||||
(x.second.title and x.second.title.lower() or ''))
|
||||
rels = (r for r in getRelations(self, child, relationships=relationships,
|
||||
usePredicateIndex=usePredicateIndex)
|
||||
if canListObject(r.second, noSecurityCheck) and
|
||||
|
|
Loading…
Add table
Reference in a new issue