mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-27 16:46:42 -06:00
Server Upgrade: fix remove statement
If value does not exists then do not update entry. Otherwise, together with nonexistent entry, the LDAP decode error will be raised. https://fedorahosted.org/freeipa/ticket/4904 Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
parent
f903c2d5bf
commit
9eedffdfa6
@ -648,9 +648,10 @@ class LDAPUpdate:
|
||||
entry_values.remove(update_value)
|
||||
except ValueError:
|
||||
self.warning("remove: '%s' not in %s", update_value, attr)
|
||||
pass
|
||||
entry[attr] = entry_values
|
||||
self.debug('remove: updated value %s', safe_output(attr, entry_values))
|
||||
else:
|
||||
entry[attr] = entry_values
|
||||
self.debug('remove: updated value %s', safe_output(
|
||||
attr, entry_values))
|
||||
elif action == 'add':
|
||||
self.debug("add: '%s' to %s, current value %s", safe_output(attr, update_value), attr, safe_output(attr, entry_values))
|
||||
# Remove it, ignoring errors so we can blindly add it later
|
||||
|
Loading…
Reference in New Issue
Block a user