diff options
author | Jan Cholasta <jcholast@redhat.com> | 2016-06-06 12:14:21 +0200 |
---|---|---|
committer | Jan Cholasta <jcholast@redhat.com> | 2016-06-09 09:11:28 +0200 |
commit | 9c19dd3506a28d4966adb950c8f5016d6d5ce55a (patch) | |
tree | 3cbbd941d65554b957a3ceca967c5fb188085539 /ipaserver/plugins/schema.py | |
parent | 4660bb7ff0197649c8777151a3a2a5378929e842 (diff) | |
download | freeipa-9c19dd3506a28d4966adb950c8f5016d6d5ce55a.tar.gz freeipa-9c19dd3506a28d4966adb950c8f5016d6d5ce55a.tar.xz freeipa-9c19dd3506a28d4966adb950c8f5016d6d5ce55a.zip |
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 <dkupka@redhat.com>
Diffstat (limited to 'ipaserver/plugins/schema.py')
-rw-r--r-- | ipaserver/plugins/schema.py | 3 |
1 files changed, 1 insertions, 2 deletions
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) |