Reformat DNS name servers

This commit is contained in:
Erin 2023-10-23 15:20:34 -07:00
parent ea567192d0
commit 9c939d4a84
No known key found for this signature in database
GPG key ID: 1CAD275313C62460

View file

@ -257,10 +257,8 @@ class Domain(TimeStampedModel, DomainHelper):
hostList = []
for host in hosts:
host_info = host["name"]
if len(host["addrs"]) > 0:
hostList.append(tuple(host["addrs"]))
hostList.append(host_info)
host_info_str = f'{host["name"]} {host["addrs"] if len(host["addrs"]) > 0 else ""}'
hostList.append(host_info_str)
return hostList
@Cache