mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-23 03:06:01 +02:00
Format hosts to name (IP addresses)
This commit is contained in:
parent
9c939d4a84
commit
fbbde98409
1 changed files with 5 additions and 1 deletions
|
@ -257,7 +257,11 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
|
||||
hostList = []
|
||||
for host in hosts:
|
||||
host_info_str = f'{host["name"]} {host["addrs"] if len(host["addrs"]) > 0 else ""}'
|
||||
# can remove str conversion when EPP.IP address display changes from IP object -> IP address
|
||||
host_addrs_stringified = [str(addr) for addr in host["addrs"]]
|
||||
host_addrs_str = ""
|
||||
host_addrs_str = f'({", ".join(obj for obj in host_addrs_stringified)})'
|
||||
host_info_str = f'{host["name"]} {host_addrs_str if len(host["addrs"]) > 0 else ""}'
|
||||
hostList.append(host_info_str)
|
||||
return hostList
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue