mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 15:40:01 -06:00
Fix modlist generation code not to generate empty replace mods.
https://fedorahosted.org/freeipa/ticket/4138 Reviewed-By: Petr Viktorin <pviktori@redhat.com>
This commit is contained in:
parent
e99fa380af
commit
c0c38ed314
@ -978,12 +978,12 @@ class LDAPEntry(collections.MutableMapping):
|
||||
names = set(self.iterkeys())
|
||||
names.update(self._orig)
|
||||
for name in names:
|
||||
new = self.raw.get(name)
|
||||
old = self._orig.get(name)
|
||||
new = self.raw.get(name, [])
|
||||
old = self._orig.get(name, [])
|
||||
if old and not new:
|
||||
modlist.append((ldap.MOD_DELETE, name, None))
|
||||
continue
|
||||
if not old:
|
||||
if not old and new:
|
||||
modlist.append((ldap.MOD_REPLACE, name, new))
|
||||
continue
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user