From 5fc7763a65495cf2ec82c2c2c812944014c8c5a9 Mon Sep 17 00:00:00 2001 From: grisel-davy Date: Thu, 30 Aug 2018 23:08:23 +0200 Subject: [PATCH] Empeche la syncronisation ldap pour les users_not_yet_member --- users/models.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/users/models.py b/users/models.py index 3e6128a3..d73d5b98 100755 --- a/users/models.py +++ b/users/models.py @@ -563,10 +563,11 @@ class User(RevMixin, FieldPermissionModelMixin, AbstractBaseUser, try: user_ldap = LdapUser.objects.get(uidNumber=self.uid_number) except LdapUser.DoesNotExist: - user_ldap = LdapUser(uidNumber=self.uid_number) - base = True - access_refresh = True - mac_refresh = True + if self.state != 3: + user_ldap = LdapUser(uidNumber=self.uid_number) + base = True + access_refresh = True + mac_refresh = True if base: user_ldap.name = self.pseudo user_ldap.sn = self.pseudo