Recherche correcte si un seul champ de recherche.

darcs-hash:20050901204025-41617-87fcef00f4400a4914158b4d87c9f1d5850db002.gz
This commit is contained in:
pauget 2005-09-01 22:40:25 +02:00
parent 4f02c48ae8
commit 8076ab376a

View file

@ -550,7 +550,14 @@ class crans_ldap :
if not r['machine'] and not r['adherent'] and not r['club'] :
# Pas de réponses
return result
elif not r['adherent'] and not r['club'] :
elif len(conds) == 1 :
# Filtre sur un seul champ
# => on retourne tout
for i in filtres :
if not r[i] : continue
for res in r[i] :
result[i].append(globals()[i](res,mode,self.conn))
elif not r['adherent'] and not r['club'] :
# Il n'y avait seulement un filtre machine
# => on retourne uniquement les machines trouvées
for m in r['machine'] :