summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
authorPavel Zuna <pzuna@redhat.com>2010-08-09 19:50:15 -0400
committerRob Crittenden <rcritten@redhat.com>2010-08-12 09:03:36 -0400
commitcc9d0ffc673d53c7dfb15e9c5c4db0a924d1245d (patch)
tree4b080eab45e1680b5b78ca577a38e21f2a2bf573 /ipalib
parent6136f773a9d70bda9363cb53d6fdb5541a3fa3c0 (diff)
downloadfreeipa-cc9d0ffc673d53c7dfb15e9c5c4db0a924d1245d.tar.gz
freeipa-cc9d0ffc673d53c7dfb15e9c5c4db0a924d1245d.tar.xz
freeipa-cc9d0ffc673d53c7dfb15e9c5c4db0a924d1245d.zip
Fix bug: not found exc. handler was failing for singleton objects
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,
}
)