summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@0d.be>2011-12-04 19:35:12 (GMT)
committerFrédéric Péters <fpeters@0d.be>2011-12-04 19:35:12 (GMT)
commit615e913ef8ca3b2b947dbb680ef5e33b0f84c9aa (patch)
tree80472311ac4b68a5283ad124433569276a2e07e6
parent2648a76447c519a8aa6bddd01c8c35b7327c0925 (diff)
downloadtabellio.searchform-615e913ef8ca3b2b947dbb680ef5e33b0f84c9aa.zip
tabellio.searchform-615e913ef8ca3b2b947dbb680ef5e33b0f84c9aa.tar.gz
tabellio.searchform-615e913ef8ca3b2b947dbb680ef5e33b0f84c9aa.tar.bz2
simpler cmp function for polgroups
-rw-r--r--tabellio/searchform/form.py2
1 files changed, 1 insertions, 1 deletions
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)