From 7d248c6d0ed54f3c7d1c48ce55c6868fcb61dfc7 Mon Sep 17 00:00:00 2001 From: glondu Date: Thu, 2 Mar 2006 18:35:15 +0100 Subject: [PATCH] Correction. darcs-hash:20060302173515-68412-de219d224c2f6007f2f2d92488b71867aa976767.gz --- gestion/ldap_crans.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 8f5779c4..a82058e6 100755 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -634,7 +634,13 @@ class crans_ldap: for i in filtres: if not r[i]: continue for res in r[i]: - result[i].append(globals()[i](res,mode,self.conn)) + if i == "machine": + if res[1].has_key('puissance'): + result['machine'].append(BorneWifi(res, mode, self.conn)) + else: + result['machine'].append(Machine(res, mode, self.conn)) + else: + 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