mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Rename parent LDAPObject pkeys in child LDAPObject methods.
If the parent and child entries have the same attribute as primary key (such as in the DNS schema), we need to rename the parent key to prevent a param name conflict. It has no side effects, because the primary key name is always taken from the LDAPObject params, never from the method params.
This commit is contained in:
@@ -232,7 +232,11 @@ class LDAPObject(Object):
|
||||
for key in parent_obj.get_ancestor_primary_keys():
|
||||
yield key
|
||||
if parent_obj.primary_key:
|
||||
yield parent_obj.primary_key.clone(query=True)
|
||||
pkey = parent_obj.primary_key
|
||||
yield pkey.__class__(
|
||||
parent_obj.name + pkey.name, required=True, query=True,
|
||||
cli_name=parent_obj.name, label=pkey.label
|
||||
)
|
||||
|
||||
def has_objectclass(self, classes, objectclass):
|
||||
oc = map(lambda x:x.lower(),classes)
|
||||
|
||||
Reference in New Issue
Block a user