diff --git a/designateclient/cli/domains.py b/designateclient/cli/domains.py index c23a1f9..fed6e3a 100644 --- a/designateclient/cli/domains.py +++ b/designateclient/cli/domains.py @@ -67,7 +67,7 @@ class CreateDomainCommand(base.CreateCommand): if parsed_args.description: domain.description = parsed_args.description - if parsed_args.ttl: + if parsed_args.ttl is not None: domain.ttl = parsed_args.ttl return self.client.domains.create(domain) @@ -99,7 +99,7 @@ class UpdateDomainCommand(base.UpdateCommand): if parsed_args.email: domain.email = parsed_args.email - if parsed_args.ttl: + if parsed_args.ttl is not None: domain.ttl = parsed_args.ttl if parsed_args.no_description: diff --git a/designateclient/cli/records.py b/designateclient/cli/records.py index b9eddc5..ef8b6af 100644 --- a/designateclient/cli/records.py +++ b/designateclient/cli/records.py @@ -76,7 +76,7 @@ class CreateRecordCommand(base.CreateCommand): data=parsed_args.data, ) - if parsed_args.ttl: + if parsed_args.ttl is not None: record.ttl = parsed_args.ttl if parsed_args.priority: @@ -131,7 +131,7 @@ class UpdateRecordCommand(base.UpdateCommand): if parsed_args.no_ttl: record.ttl = None - elif parsed_args.ttl: + elif parsed_args.ttl is not None: record.ttl = parsed_args.ttl if parsed_args.no_priority: