From 1f21cbad47d30bdb263d4dfca5d80fb4fd13379b Mon Sep 17 00:00:00 2001 From: Felipe Vieira Date: Tue, 6 Dec 2011 19:37:32 +0000 Subject: [PATCH] ajustando script de sincronizacao com LDAP --- sigi/apps/servidores/management/commands/sync_ldap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sigi/apps/servidores/management/commands/sync_ldap.py b/sigi/apps/servidores/management/commands/sync_ldap.py index 1fc0c95..9ad615c 100644 --- a/sigi/apps/servidores/management/commands/sync_ldap.py +++ b/sigi/apps/servidores/management/commands/sync_ldap.py @@ -57,7 +57,7 @@ class Command(BaseCommand): except: email = '' try: first_name = ldap_user[1]['givenName'][0] except: first_name = username - try: last_name = ldap_user[1]['sn'][0] + try: last_name = ldap_user[1]['sn'][0][:30] except: last_name = '' try: user = User.objects.get(username=username) except User.DoesNotExist: