From 615e913ef8ca3b2b947dbb680ef5e33b0f84c9aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 4 Dec 2011 20:35:12 +0100 Subject: [PATCH] simpler cmp function for polgroups --- tabellio/searchform/form.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tabellio/searchform/form.py b/tabellio/searchform/form.py index 9099cbb..5c751d4 100644 --- a/tabellio/searchform/form.py +++ b/tabellio/searchform/form.py @@ -307,7 +307,7 @@ def possible_polgroups(context): else: inactive_groups.append(SimpleVocabulary.createTerm(polgroup_id, polgroup_id, polgroup_str)) # keep active groups ordered by their position - inactive_groups.sort(cmp_term) + inactive_groups.sort(lambda x,y: cmp(x.value, y.value)) return SimpleVocabulary(active_groups + inactive_groups) @grok.provider(IContextSourceBinder)