From b5cb95431bffd39475fa82a453ef057890425529 Mon Sep 17 00:00:00 2001 From: Thierry Bordaz Date: Wed, 1 Jul 2015 14:46:22 +0200 Subject: 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' Reviewed-By: Tomas Babej --- ipalib/plugins/stageuser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipalib') diff --git a/ipalib/plugins/stageuser.py b/ipalib/plugins/stageuser.py index 01c01cea3..35e636ded 100644 --- a/ipalib/plugins/stageuser.py +++ b/ipalib/plugins/stageuser.py @@ -512,7 +512,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 \'%(attribute)s\'') % dict(attribute=attr), ) def _build_new_entry(self, ldap, dn, entry_from, entry_to): -- cgit