Correction.
darcs-hash:20060302175951-68412-22d4ed1f962377a2362925d4b74c39c62ce4150d.gz
This commit is contained in:
parent
5732e70ded
commit
1c98fc9b76
1 changed files with 9 additions and 3 deletions
|
@ -694,10 +694,10 @@ class crans_ldap:
|
||||||
|
|
||||||
else:
|
else:
|
||||||
### Recherche d'une chaine sur tous les champs
|
### Recherche d'une chaine sur tous les champs
|
||||||
conv = { 'machine': machine , 'club': club, 'adherent': adherent }
|
conv = { 'club': club, 'adherent': adherent }
|
||||||
|
|
||||||
for i in filtres:
|
for i in filtres:
|
||||||
cl = conv[i]
|
cl = conv.get(i)
|
||||||
|
|
||||||
# Construction du filtre
|
# Construction du filtre
|
||||||
filtre = '(&(|'
|
filtre = '(&(|'
|
||||||
|
@ -707,7 +707,13 @@ class crans_ldap:
|
||||||
|
|
||||||
# Recherche
|
# Recherche
|
||||||
for r in self.conn.search_s(self.base_dn,self.scope[i],filtre):
|
for r in self.conn.search_s(self.base_dn,self.scope[i],filtre):
|
||||||
result[i].append( cl(r,mode,self.conn) )
|
if i == 'machine':
|
||||||
|
if r[1].has_key('puissance'):
|
||||||
|
result['machine'].append(BorneWifi(r, mode, self.conn))
|
||||||
|
else:
|
||||||
|
result['machine'].append(Machine(r, mode, self.conn))
|
||||||
|
else:
|
||||||
|
result[i].append(cl(r, mode, self.conn))
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue