summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/plugins/baseldap.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 0c9918f53..c42039a5d 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -117,9 +117,12 @@ class LDAPObject(Object):
del entry_attrs[attr]
def handle_not_found(self, *keys):
+ pkey = ''
+ if self.primary_key:
+ pkey = keys[-1]
raise errors.NotFound(
reason=self.object_not_found_msg % {
- 'pkey': keys[-1], 'oname': self.object_name,
+ 'pkey': pkey, 'oname': self.object_name,
}
)