diff --git a/lc_ldap.py b/lc_ldap.py index 8aeea15..8d9f0a6 100644 --- a/lc_ldap.py +++ b/lc_ldap.py @@ -569,7 +569,7 @@ class lc_ldap(ldap.ldapobject.LDAPObject, object): club = obj if isinstance(obj, objets.machine) or isinstance(obj, objets.facture): club = obj.proprio() - if isinstance(club, objets.club) and "aid=" + str(club['responsable'][0]) + "," + variables.base_dn == self.dn: + if isinstance(club, objets.club) and "aid=" + str(club.get('responsable', [''])[0]) + "," + variables.base_dn == self.dn: return [attributs.respo] return []