From 9c19dd3506a28d4966adb950c8f5016d6d5ce55a Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Mon, 6 Jun 2016 12:14:21 +0200 Subject: schema: do not validate unrequested params in command_defaults Request specific params when getting the defaults instead of getting defaults for all params and filtering the result. This fixes command_defaults failing with validation errors on unrequested params. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka --- ipaserver/plugins/schema.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ipaserver/plugins/schema.py') diff --git a/ipaserver/plugins/schema.py b/ipaserver/plugins/schema.py index 8bc230350..d66943c2e 100644 --- a/ipaserver/plugins/schema.py +++ b/ipaserver/plugins/schema.py @@ -229,8 +229,7 @@ class command_defaults(PKQuery): raise errors.ConversionError(name=name, error=_("must be a dictionary")) - result = command.get_default(**kw) - result = {n: v for n, v in result.items() if n in params} + result = command.get_default(params, **kw) return dict(result=result) -- cgit