From a2299070c86ae049fb5702a72567a820fe6eaa28 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Thu, 15 Mar 2012 04:32:37 -0400 Subject: Change parameters to use only default_from for dynamic default values. Replace all occurences of create_default with equivalent default_from and remove create_default from the framework. This is needed for proper parameter validation, as there is no way to tell which parameters to validate prior to calling create_default, because create_default does not provide information about which parameters are used for generating the default value. --- ipalib/plugins/passwd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipalib/plugins/passwd.py') diff --git a/ipalib/plugins/passwd.py b/ipalib/plugins/passwd.py index b26f7e9f..9bee314e 100644 --- a/ipalib/plugins/passwd.py +++ b/ipalib/plugins/passwd.py @@ -69,7 +69,7 @@ class passwd(Command): label=_('User name'), primary_key=True, autofill=True, - create_default=lambda **kw: util.get_current_principal(), + default_from=lambda: util.get_current_principal(), normalizer=lambda value: normalize_principal(value), ), Password('password', -- cgit