Fix problem with sorting in collections

This commit is contained in:
Charles Haley 2010-12-04 14:10:35 +00:00
parent 9dd662ac0b
commit d9cd3fd0b0

View File

@ -237,7 +237,10 @@ class CollectionsBookList(BookList):
return 1 return 1
if y is None: if y is None:
return -1 return -1
c = cmp(sort_key(x), sort_key(y)) if isinstance(x, unicode):
c = cmp(sort_key(x), sort_key(y))
else:
c = cmp(x, y)
if c != 0: if c != 0:
return c return c
# same as above -- no sort_key needed here # same as above -- no sort_key needed here