[whokfet] On détecte à part les mahines du BDE

This commit is contained in:
Vincent Le Gallic 2014-04-17 23:02:13 +02:00
parent 6ad598f669
commit 75bfd1880a

View file

@ -43,6 +43,7 @@ def get_state():
res = {'ma': [], res = {'ma': [],
'crans': [], 'crans': [],
'adh': [], 'adh': [],
'bde': [],
'unknown_macs': [], 'unknown_macs': [],
'ttyfound': 0, 'ttyfound': 0,
} }
@ -60,6 +61,8 @@ def get_state():
key = 'crans' key = 'crans'
elif hasattr(m.proprietaire(),'droits') and m.proprietaire().droits(): elif hasattr(m.proprietaire(),'droits') and m.proprietaire().droits():
key = 'ma' key = 'ma'
elif m.proprietaire().idn == "cid" and m.proprietaire().id() == "1":
key = 'bde'
else: else:
key = 'adh' key = 'adh'
res[key].append(m) res[key].append(m)