mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-22 10:46:06 +02:00
fixed minor bug and formatting
This commit is contained in:
parent
bd3c150067
commit
ed7868efba
2 changed files with 12 additions and 11 deletions
|
@ -298,12 +298,12 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
try:
|
||||
# attempt to retrieve hosts from registry and store in cache and db
|
||||
hosts = self._get_property("hosts")
|
||||
except Exception as err:
|
||||
except Exception:
|
||||
# If exception raised returning hosts from registry, get from db
|
||||
hosts = []
|
||||
for host in self.host.all():
|
||||
host_name = host.name
|
||||
ips = [ip.address for ip in host.ip.all()]
|
||||
for hostobj in self.host.all():
|
||||
host_name = hostobj.name
|
||||
ips = [ip.address for ip in hostobj.ip.all()]
|
||||
hosts.append({"name": host_name, "addrs": ips})
|
||||
|
||||
# TODO-687 fix this return value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue