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:
@@ -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
|
||||
|
Reference in New Issue
Block a user