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