Recherche correcte si un seul champ de recherche.
darcs-hash:20050901204025-41617-87fcef00f4400a4914158b4d87c9f1d5850db002.gz
This commit is contained in:
parent
4f02c48ae8
commit
8076ab376a
1 changed files with 8 additions and 1 deletions
|
@ -550,7 +550,14 @@ class crans_ldap :
|
||||||
if not r['machine'] and not r['adherent'] and not r['club'] :
|
if not r['machine'] and not r['adherent'] and not r['club'] :
|
||||||
# Pas de réponses
|
# Pas de réponses
|
||||||
return result
|
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
|
# Il n'y avait seulement un filtre machine
|
||||||
# => on retourne uniquement les machines trouvées
|
# => on retourne uniquement les machines trouvées
|
||||||
for m in r['machine'] :
|
for m in r['machine'] :
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue