metasync: remove deleted attributes

This commit is contained in:
Benjamin Dauvergne 2016-02-11 16:55:17 +01:00
parent 0d718ee963
commit dbfb82f540
1 changed files with 3 additions and 0 deletions

View File

@ -308,6 +308,9 @@ for results in batch_generator(rconn.paged_search_ext_s(
actions.append((RENAME, found_dns[k], target_dn))
renames += 1
if to_dict_of_set(existing_entry) != to_dict_of_set(entry):
for key in existing_entry:
if key not in entry:
entry[key] = [] # remove deleted attributes
actions.append((UPDATE, target_dn, entry))
updates += 1
else: