1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

set default value for nsone cname to None, use first value if non-zero length

This commit is contained in:
Adam Smith
2017-10-26 23:55:48 -07:00
parent 1a0055eedb
commit 00aaa3bf4d
2 changed files with 36 additions and 1 deletions

View File

@@ -69,10 +69,14 @@ class Ns1Provider(BaseProvider):
}
def _data_for_CNAME(self, _type, record):
try:
value = record['short_answers'][0]
except IndexError:
value = None
return {
'ttl': record['ttl'],
'type': _type,
'value': record['short_answers'][0],
'value': value,
}
_data_for_ALIAS = _data_for_CNAME