diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2008-11-12 01:47:37 -0700 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2008-11-12 01:47:37 -0700 |
commit | 09161e399a61e2a548e9efb3c3abb2c7b47d5520 (patch) | |
tree | a168eb43e22563cb328631605ec8ee6f4a814165 /ipalib/frontend.py | |
parent | 014af24731ff39520a9635694ed99dc9d09669c9 (diff) | |
download | freeipa-09161e399a61e2a548e9efb3c3abb2c7b47d5520.tar.gz freeipa-09161e399a61e2a548e9efb3c3abb2c7b47d5520.tar.xz freeipa-09161e399a61e2a548e9efb3c3abb2c7b47d5520.zip |
Command.get_default() will now fill-in None for all missing non-required params
Diffstat (limited to 'ipalib/frontend.py')
-rw-r--r-- | ipalib/frontend.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py index 62a503cc5..ce4168bc9 100644 --- a/ipalib/frontend.py +++ b/ipalib/frontend.py @@ -639,8 +639,11 @@ class Command(plugable.Plugin): Generator method used by `Command.get_default`. """ for param in self.params(): - if param.required and kw.get(param.name, None) is None: - yield (param.name, param.get_default(**kw)) + if kw.get(param.name, None) is None: + if param.required: + yield (param.name, param.get_default(**kw)) + else: + yield (param.name, None) def validate(self, **kw): """ @@ -694,7 +697,7 @@ class Command(plugable.Plugin): """ Forward call over XML-RPC to this same command on server. """ - return self.api.Backend.xmlrpc.forward_call(self.name, *args, **kw) + return self.Backend.xmlrpc.forward_call(self.name, *args, **kw) def finalize(self): """ |