From aec70024c5be94bbf0e9fbcb23a30ce7431d6383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 27 Aug 2012 11:26:29 +0200 Subject: [PATCH] sort: if session is equal, and there's no number, use the date --- tabellio/searchform/cmpfunctions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tabellio/searchform/cmpfunctions.py b/tabellio/searchform/cmpfunctions.py index deca707..71448db 100644 --- a/tabellio/searchform/cmpfunctions.py +++ b/tabellio/searchform/cmpfunctions.py @@ -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