[objets] Un peu plus de clarté sur le repr d'un adhérent, et sur __setitem__
This commit is contained in:
parent
dd2ed0cd85
commit
aa1c77ce60
1 changed files with 2 additions and 2 deletions
|
@ -570,7 +570,7 @@ class CransLdapObject(object):
|
||||||
if mixed_attrs:
|
if mixed_attrs:
|
||||||
# Tests de droits.
|
# Tests de droits.
|
||||||
if not mixed_attrs[0].is_modifiable(self.conn.droits + self.conn._check_parent(self.dn) + self.conn._check_self(self.dn)):
|
if not mixed_attrs[0].is_modifiable(self.conn.droits + self.conn._check_parent(self.dn) + self.conn._check_self(self.dn)):
|
||||||
raise EnvironmentError("Vous ne pouvez pas toucher aux attributs de type %r." % (attr))
|
raise EnvironmentError("Vous ne pouvez pas modifier l'attribut %r de l'objet %r." % (attr, self))
|
||||||
|
|
||||||
|
|
||||||
# On ajoute des locks sur les nouvelles valeurs
|
# On ajoute des locks sur les nouvelles valeurs
|
||||||
|
@ -1127,7 +1127,7 @@ class adherent(proprio):
|
||||||
ldap_name = "adherent"
|
ldap_name = "adherent"
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return str(self.__class__) + " : aid=" + str(self['aid'][0])
|
return "Adhérent : " + str(self['prenom'][0]) + " " + str(self['nom'][0])
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(adherent, self).__init__(*args, **kwargs)
|
super(adherent, self).__init__(*args, **kwargs)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue