From a5f322cb7b9b4d999a6394197c3730062896780c Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Wed, 22 Jan 2014 12:50:19 +0100 Subject: Get original entry state from LDAP in LDAPUpdate. --- ipalib/plugins/baseldap.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py index eab8d74e0..c59f5fa21 100644 --- a/ipalib/plugins/baseldap.py +++ b/ipalib/plugins/baseldap.py @@ -1332,7 +1332,12 @@ class LDAPUpdate(LDAPQuery, crud.Update): # mean an error occurred, just that there were no other updates to # perform. assert isinstance(dn, DN) - self._exc_wrapper(keys, options, ldap.update_entry)(dn, entry_attrs) + + update = self._exc_wrapper(keys, options, ldap.get_entry)( + dn, entry_attrs.keys()) + update.update(entry_attrs) + + self._exc_wrapper(keys, options, ldap.update_entry)(update) except errors.EmptyModlist, e: if not rdnupdate: raise e -- cgit