From cc9d0ffc673d53c7dfb15e9c5c4db0a924d1245d Mon Sep 17 00:00:00 2001 From: Pavel Zuna Date: Mon, 9 Aug 2010 19:50:15 -0400 Subject: Fix bug: not found exc. handler was failing for singleton objects --- ipalib/plugins/baseldap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ipalib/plugins/baseldap.py') diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py index 0c9918f5..c42039a5 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, } ) -- cgit