Make sure attributeTypes updates are done before objectClasses updates.

https://fedorahosted.org/freeipa/ticket/3521
This commit is contained in:
Jan Cholasta 2013-02-11 16:26:58 +01:00 committed by Martin Kosek
parent 9ecf4b7aac
commit 463407ac6f

View File

@ -2009,7 +2009,10 @@ class IPAdmin(LDAPClient):
# replace any existing schema. # replace any existing schema.
if old_entry.get('dn', DN()) == DN(('cn', 'schema')): if old_entry.get('dn', DN()) == DN(('cn', 'schema')):
if len(adds) > 0: if len(adds) > 0:
modlist.append((ldap.MOD_ADD, key, adds)) if key == 'attributetypes':
modlist.insert(0, (ldap.MOD_ADD, key, adds))
else:
modlist.append((ldap.MOD_ADD, key, adds))
else: else:
if adds: if adds:
if force_replace: if force_replace: