From f476c097d2ac5f0270ea3207955cd7184ffb9e1d Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 23 Feb 2011 10:43:40 -0500 Subject: Replace only if old and new have nothing in common Jakub did the initial diagnosis of this, I added a fix for removing the last entry when removing members and a test case. ticket 1000 --- ipaserver/plugins/ldap2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipaserver') diff --git a/ipaserver/plugins/ldap2.py b/ipaserver/plugins/ldap2.py index 568792d1b..ebbca60e5 100644 --- a/ipaserver/plugins/ldap2.py +++ b/ipaserver/plugins/ldap2.py @@ -798,7 +798,7 @@ class ldap2(CrudBackend, Encoder): force_replace = False if k in self._FORCE_REPLACE_ON_UPDATE_ATTRS or is_single_value: force_replace = True - elif len(adds) == 1 and len(rems) == 1: + elif len(v) > 0 and len(v.intersection(old_v)) == 0: force_replace = True if adds: -- cgit