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

Added detection for edge case that could happen with existing records where the value is '@'

TransIP allows '@' as value to alias the root record.
'@' was on populate appended with the zone, which trigger an unneeded update.
'@' => '@.example.com.' -> 'example.com'
This fix will stop the unneeded update
This commit is contained in:
Maikel Poot
2019-09-25 11:24:13 +02:00
parent 7056d29907
commit 59e44b865c
2 changed files with 8 additions and 1 deletions

View File

@@ -218,7 +218,12 @@ class TransipProvider(BaseProvider):
def _parse_to_fqdn(self, value):
if (value[-1] != '.'):
# TransIP allows '@' as value to alias the root record.
# this provider won't set an '@' value, but can be an existing record
if value == self.ROOT_RECORD:
value = self._currentZone.name
if value[-1] != '.':
self.log.debug('parseToFQDN: changed %s to %s', value,
'{}.{}'.format(value, self._currentZone.name))
value = '{}.{}'.format(value, self._currentZone.name)