Merge branch 'PowerDNS-Admin:master' into setup-new-wiki-docs-2

This commit is contained in:
David Mc Ken 2022-12-08 21:56:50 -04:00 committed by GitHub
commit 83e2d3f655
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,12 +119,16 @@ def fetch_json(remote_url,
def display_record_name(data):
# Check that the data argument is a tuple containing two elements
if isinstance(data, Iterable) and len(data) == 2:
record_name, domain_name = data
if record_name == domain_name:
return '@'
else:
return re.sub('\.{}$'.format(domain_name), '', record_name)
return record_name
else:
# If data is not a tuple of length 2, return an empty string
return ''
def display_master_name(data):
"""