sort: if session is equal, and there's no number, use the date

This commit is contained in:
Frédéric Péters 2012-08-27 11:26:29 +02:00
parent 45d30d4e13
commit aec70024c5
1 changed files with 2 additions and 0 deletions

View File

@ -112,5 +112,7 @@ class Cmp:
t = -cmp(get_no_as_int(x.no), get_no_as_int(y.no))
if t == 0 and hasattr(x, 'nodoc'):
t = cmp(x.nodoc, y.nodoc)
elif t == 0 and hasattr(x, 'date'):
t = cmp(x.date, y.date)
return t