Commit 673b775e authored by Daniel STAN's avatar Daniel STAN fix crash si chambre Inconnue

parent 11a5c70b
......@@ -339,10 +339,13 @@ def decide_vlan(data, is_wifi, conn):
decision = 'adherent', u''
prise, chbre = get_prise_chbre(data)
port = "%s/%s" % (prise, chbre)
port = "%s/%s" % (prise, chbre or 'Inconnue')
if chbre:
chbre = escape_ldap(chbre)
hebergeurs ='(&(chbre=%s)(|(cid=*)(aid=*)))' % chbre)
hebergeurs = []
# Prend la première machine candidat dans la base, ou exit
items = get_machines(data, is_wifi=is_wifi, proprio=(hebergeurs+[None])[0])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment