mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipaldap: preserve order of values in LDAPEntry._sync()
In Python 2, the order was preserved by accident. This change makes sure the order is preserved in both Python 2 and 3. https://fedorahosted.org/freeipa/ticket/4985 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
b20f6fb294
commit
e920ae2252
@@ -292,13 +292,13 @@ class LDAPEntry(collections.MutableMapping):
|
||||
continue
|
||||
nice.remove(value)
|
||||
|
||||
for value in nice_adds:
|
||||
for value in sorted(nice_adds, key=nice.index):
|
||||
value = self._conn.encode(value)
|
||||
if value in raw_dels:
|
||||
continue
|
||||
raw.append(value)
|
||||
|
||||
for value in raw_adds:
|
||||
for value in sorted(raw_adds, key=raw.index):
|
||||
try:
|
||||
value = self._conn.decode(value, name)
|
||||
except ValueError as e:
|
||||
|
Reference in New Issue
Block a user