From 5e58c7b59df9701feb90829919766b7e87ef0cad Mon Sep 17 00:00:00 2001 From: Evarin Date: Tue, 2 May 2017 03:31:38 +0200 Subject: [PATCH] Debug LDAP --- avisstage/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/avisstage/models.py b/avisstage/models.py index 583e752..6914183 100644 --- a/avisstage/models.py +++ b/avisstage/models.py @@ -66,11 +66,11 @@ def create_user_profile(sender, instance, created, **kwargs): dirs = infos['homeDirectory'][0].split('/') if dirs[1] == 'users': annee = dirs[2] - dep = dirs[4] + dep = dirs[3] dep = dict(DEPARTEMENTS_DEFAUT).get(dep.lower(), '') profil.promotion = u'%s %s' % (dep, annee) pmail = infos.get('mailRoutingAddress', - ['%s@clipper.ens.fr'%instance.username]) + ['%s@clipper.ens.fr'%instance.username]) if len(pmail) > 0: profil.mail = pmail[0] profil.save()