diff options
author | Pavel Zuna <pzuna@redhat.com> | 2010-08-09 19:50:15 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2010-08-12 09:03:36 -0400 |
commit | cc9d0ffc673d53c7dfb15e9c5c4db0a924d1245d (patch) | |
tree | 4b080eab45e1680b5b78ca577a38e21f2a2bf573 /ipalib | |
parent | 6136f773a9d70bda9363cb53d6fdb5541a3fa3c0 (diff) | |
download | freeipa-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.py | 5 |
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, } ) |