diff --git a/ctmcommands/admin/createuser.py b/ctmcommands/admin/createuser.py index d9f41e8..adc3010 100644 --- a/ctmcommands/admin/createuser.py +++ b/ctmcommands/admin/createuser.py @@ -41,7 +41,7 @@ class CreateUser(ctmcommands.cmd.CSKCommand): Param(name='forcechange', short_name='f', long_name='forcechange', optional=True, ptype='integer', doc='Require user to change password. Default is "true" (1) if omitted. (Valid values: 0 or 1).', - choices=[0, 1]), + choices=[0, 1], default=1), Param(name='status', short_name='s', long_name='status', optional=True, ptype='string', doc='Status of the new account. Default is "enabled" if omitted. (Valid values: enabled, disabled, locked)', diff --git a/ctmcommands/admin/updateuser.py b/ctmcommands/admin/updateuser.py index 7ca41da..46ea3a2 100644 --- a/ctmcommands/admin/updateuser.py +++ b/ctmcommands/admin/updateuser.py @@ -44,7 +44,7 @@ class UpdateUser(ctmcommands.cmd.CSKCommand): Param(name='forcechange', short_name='f', long_name='forcechange', optional=True, ptype='integer', doc='Require user to change password. Default is "true" (1) if omitted. (Valid values: 0 or 1).', - choices=[0, 1]), + choices=[0, 1], default=1), Param(name='status', short_name='s', long_name='status', optional=True, ptype='string', doc='Status of the new account. Default is "enabled" if omitted. (Valid values: enabled, disabled, locked)', diff --git a/ctmcommands/cmd.py b/ctmcommands/cmd.py index 365d752..22c3fe0 100644 --- a/ctmcommands/cmd.py +++ b/ctmcommands/cmd.py @@ -399,7 +399,7 @@ def call_api(self, method, parameters=[], data={}, verb="GET", content_type=None args = data argstr = "" for param in parameters: - if getattr(self, param, None): + if getattr(self, param, None) is not None: args[param] = getattr(self, param) # if post then args are a dict, if get args are qs