wrote tests; fixed existing tests

This commit is contained in:
David Kennedy 2023-12-21 13:47:25 -05:00
parent f5f3b2335b
commit bd3c150067
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
3 changed files with 65 additions and 2 deletions

View file

@ -13,7 +13,6 @@ from typing import Any
from registrar.models.host import Host
from registrar.models.host_ip import HostIP
from registrar.utility.errors import (
ActionNotAllowed,
NameserverError,
@ -297,6 +296,7 @@ class Domain(TimeStampedModel, DomainHelper):
while non-subordinate hosts MUST NOT.
"""
try:
# attempt to retrieve hosts from registry and store in cache and db
hosts = self._get_property("hosts")
except Exception as err:
# If exception raised returning hosts from registry, get from db