simpler cmp function for polgroups
This commit is contained in:
parent
2648a76447
commit
615e913ef8
|
@ -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)
|
||||
|
|
Reference in New Issue