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

Fix handling of NULL SRV records in DigitalOcean provider

This commit is contained in:
Mark Tearle
2020-12-09 21:23:14 +08:00
parent 403be8bb83
commit 39412924da
3 changed files with 48 additions and 4 deletions

View File

@@ -186,10 +186,14 @@ class DigitalOceanProvider(BaseProvider):
def _data_for_SRV(self, _type, records):
values = []
for record in records:
target = (
'{}.'.format(record['data'])
if record['data'] != "." else "."
)
values.append({
'port': record['port'],
'priority': record['priority'],
'target': '{}.'.format(record['data']),
'target': target,
'weight': record['weight']
})
return {