Fix if checking on ttl for Create/Update commands
Change-Id: I13412fee6c71b00cd5e4bc2ca8c2074cc01fc6d0
This commit is contained in:
parent
92b5872d49
commit
e0e428acaf
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user