From e7ba95b36d665f79df850c05eb31a90843864e3b Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Tue, 1 Dec 2015 00:21:32 +0100 Subject: [PATCH] =?UTF-8?q?Permet=20de=20remettre=20la=20mac=20=C3=A0=20au?= =?UTF-8?q?to,=20distinction=20entre=20ip=20auto=20et=20mac=20auto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestion/dialog/machine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gestion/dialog/machine.py b/gestion/dialog/machine.py index 9c1d859c..56dc85d5 100644 --- a/gestion/dialog/machine.py +++ b/gestion/dialog/machine.py @@ -91,7 +91,7 @@ class Dialog(certificat.Dialog, blacklist.Dialog): def modif_machine(machine, attrs): with self.conn.search(dn=machine.dn, scope=0, mode='rw')[0] as machine: for (key, values) in attrs.items(): - if values!=u'': + if values!=u'' or key != 'ipHostNumber': machine[key]=values machine.validate_changes() machine.history_gen() @@ -108,7 +108,7 @@ class Dialog(certificat.Dialog, blacklist.Dialog): } with self.conn.newMachine(proprio.dn, realm, ldif) as machine: for (key, values) in attrs.items(): - if values!=u'': + if values!=u'' or key != u'ipHostNumber': machine[key]=values if attributs.ipsec in machine.attribs: machine[attributs.ipsec.ldap_name]=attributs.ipsec.default