From 99d65933e49360750cf18f06315e1e259dd71126 Mon Sep 17 00:00:00 2001
From: Thierry Bordaz <tbor...@redhat.com>
Date: Wed, 1 Jul 2015 14:46:22 +0200
Subject: [PATCH] Display the wrong attribute name when mandatory attribute is
 missing

When activating a stageuser, if 'sn' or 'cn' or 'uid' is missing
it displays an error with 'cn'
---
 ipalib/plugins/stageuser.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipalib/plugins/stageuser.py b/ipalib/plugins/stageuser.py
index 7c714f627f000f7b013b60b096e72587cf935022..738c1bd8f5e8e51acb78c5e8220cbabc78942188 100644
--- a/ipalib/plugins/stageuser.py
+++ b/ipalib/plugins/stageuser.py
@@ -514,7 +514,7 @@ class stageuser_activate(LDAPQuery):
             if attr not in entry:
                 raise errors.ValidationError(
                             name=self.obj.primary_key.cli_name,
-                            error=_('Entry has no \'cn\''),
+                            error=_('Entry has no \'%s\'' % attr),
                             )
 
     def _build_new_entry(self, ldap, dn, entry_from, entry_to):
-- 
1.7.11.7

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to