Commit 7c6a3959 authored by Valentin Samir's avatar Valentin Samir

[portail_captif] Désactivation de l'affaction d'une ipv4 aux machines wifi sans ipv4

parent 8467797d
......@@ -90,10 +90,10 @@ def get(str):
def get_machine_by_mac(ip):
mac_addr=mac_from_ip(ip)
machines = get(u'macAddress=%s' % mac_addr)
if machines and isinstance(machines[0], lc_ldap.objets.machineWifi):
if not 'ipHostNumber' in machines[0].attrs.keys():
machine = QUERY.search(u'macAddress=%s' % mac_addr, mode='rw')[0]
machine.set_ipv4()
#if machines and isinstance(machines[0], lc_ldap.objets.machineWifi):
# if not 'ipHostNumber' in machines[0].attrs.keys():
# machine = QUERY.search(u'macAddress=%s' % mac_addr, mode='rw')[0]
# machine.set_ipv4()
return machines
......
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