From ac2e9e84cf67b59488a07ffe932019ce3e23b41a Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Wed, 6 Apr 2016 15:26:48 +0200 Subject: frontend: do not forward argument defaults to server When forwarding a command call to a server, use only arguments which were explicitly specified by the caller. This increases compatibility between new clients and old servers. https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka --- ipalib/frontend.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ipalib/frontend.py') diff --git a/ipalib/frontend.py b/ipalib/frontend.py index c7bbead32..adad3707d 100644 --- a/ipalib/frontend.py +++ b/ipalib/frontend.py @@ -442,7 +442,8 @@ class Command(HasParam): self.debug( 'raw: %s(%s)', self.name, ', '.join(self._repr_iter(**params)) ) - params.update(self.get_default(**params)) + if self.api.env.in_server: + params.update(self.get_default(**params)) params = self.normalize(**params) params = self.convert(**params) self.debug( @@ -598,7 +599,7 @@ class Command(HasParam): # Backend.textui.prompt does not fill in the default value, # we have to do it ourselves if not raw.strip(): - raw = default + return None try: return param(raw, **kw) -- cgit