Fix if checking on ttl for Create/Update commands

Change-Id: I13412fee6c71b00cd5e4bc2ca8c2074cc01fc6d0
This commit is contained in:
Endre Karlson 2015-01-29 15:06:13 +01:00
parent 92b5872d49
commit e0e428acaf
2 changed files with 4 additions and 4 deletions

View File

@ -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:

View File

@ -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: