From 055dfaf65725bec60e2e85273ec10ce027798fde Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Thu, 23 Jun 2016 12:14:38 +0200 Subject: [PATCH] schema: do not crash in command_defaults if argument is None https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka --- ipaserver/plugins/schema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipaserver/plugins/schema.py b/ipaserver/plugins/schema.py index c3a0e60ba..96a822491 100644 --- a/ipaserver/plugins/schema.py +++ b/ipaserver/plugins/schema.py @@ -266,8 +266,8 @@ class command_defaults(PKQuery): def execute(self, name, **options): command = self.api.Command[name] - params = options.get('params', []) - kw = options.get('kw', {}) + params = options.get('params') or [] + kw = options.get('kw') or {} result = command.get_default(params, **kw)