From 171fb85533f9b65b12f5469e44f360a3f4bda2fd Mon Sep 17 00:00:00 2001 From: Paul Marillonnet Date: Mon, 25 Sep 2017 18:52:15 +0200 Subject: [PATCH] POC Campus Condorcet : tri alphabetique des champs select partie invitant --- django/sp_sso/saml/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/django/sp_sso/saml/utils.py b/django/sp_sso/saml/utils.py index e0988cb..4fa6d6c 100644 --- a/django/sp_sso/saml/utils.py +++ b/django/sp_sso/saml/utils.py @@ -114,6 +114,7 @@ def ldap_get_attribute_from_subtree_nodes(subtree_base, filter, attribute): description = node_data.get('description', [_('No description')])[0] choices.append((attribute_value, description)) + choices.sort(key=lambda x: unicode(x[1], 'utf-8')) return choices def ldap_terminate(l):