removed logs

This commit is contained in:
Alysia Broddrick 2023-09-10 17:37:53 -07:00
parent 1a680f6470
commit 3be7680311
No known key found for this signature in database
GPG key ID: 03917052CD0F06B7

View file

@ -62,7 +62,7 @@ class Domain(TimeStampedModel, DomainHelper):
SERVER_DELETE_PROHIBITED = "serverDeleteProhibited" SERVER_DELETE_PROHIBITED = "serverDeleteProhibited"
# DNS delegation information MUST NOT be published for the object. # DNS delegation information MUST NOT be published for the object.
ON_HOLD = "clientHold" CLIENT_HOLD = "clientHold"
SERVER_HOLD = "serverHold" SERVER_HOLD = "serverHold"
# Requests to renew the object MUST be rejected. # Requests to renew the object MUST be rejected.
@ -228,12 +228,12 @@ class Domain(TimeStampedModel, DomainHelper):
try: try:
hosts = self._get_property("hosts") hosts = self._get_property("hosts")
except Exception as err: except Exception as err:
#Don't throw error as this is normal for a new domain
logger.info("Domain is missing nameservers") logger.info("Domain is missing nameservers")
return None return None
hostList = [] hostList = []
for host in hosts: for host in hosts:
logger.info(host)
# TODO - this should actually have a second tuple value with the ip address # TODO - this should actually have a second tuple value with the ip address
# ignored because uncertain if we will even have a way to display mult. # ignored because uncertain if we will even have a way to display mult.
# and adresses can be a list of mult address # and adresses can be a list of mult address
@ -261,15 +261,11 @@ class Domain(TimeStampedModel, DomainHelper):
This creates the host object in the registry This creates the host object in the registry
doesn't add the created host to the domain doesn't add the created host to the domain
returns ErrorCode (int)""" returns ErrorCode (int)"""
logger.info("_create_host()->addresses is NONE") logger.info("Creating host")
# TODO - # [epp.Ip(addr="127.0.0.1"), epp.Ip(addr="0:0:0:0:0:0:0:1", ip="v6")]
if not addrs is None: if not addrs is None:
logger.info("addresses is not None %s" % addrs)
addresses = [epp.Ip(addr=addr) for addr in addrs] addresses = [epp.Ip(addr=addr) for addr in addrs]
request = commands.CreateHost(name=host, addrs=addresses) request = commands.CreateHost(name=host, addrs=addresses)
else: else:
logger.info("_create_host()-> address IS None")
request = commands.CreateHost(name=host) request = commands.CreateHost(name=host)
try: try:
@ -285,17 +281,17 @@ class Domain(TimeStampedModel, DomainHelper):
"""host should be a tuple of type str, str,... where the elements are """host should be a tuple of type str, str,... where the elements are
Fully qualified host name, addresses associated with the host Fully qualified host name, addresses associated with the host
example: [(ns1.okay.gov, 127.0.0.1, others ips)]""" example: [(ns1.okay.gov, 127.0.0.1, others ips)]"""
# TODO: call EPP to set this info. # TODO: ticket #848 finish this implementation
# if two nameservers change state to created, don't do it automatically #must delete nameservers as well or update
#ip version checking may need to be added in a different ticket
if len(hosts) > 13: if len(hosts) > 13:
raise ValueError( raise ValueError(
"Too many hosts provided, you may not have more than 13 nameservers." "Too many hosts provided, you may not have more than 13 nameservers."
) )
logger.info("hosts will follow") logger.info("Setting nameservers")
logger.info(hosts) logger.info(hosts)
for hostTuple in hosts: for hostTuple in hosts:
print("hostTuple is %s" % str(hostTuple))
host = hostTuple[0] host = hostTuple[0]
addrs = None addrs = None
if len(hostTuple) > 1: if len(hostTuple) > 1:
@ -320,7 +316,7 @@ class Domain(TimeStampedModel, DomainHelper):
) )
try: try:
self.created() self.ready()
self.save() self.save()
except: except:
logger.info( logger.info(
@ -351,20 +347,7 @@ class Domain(TimeStampedModel, DomainHelper):
# some statuses cannot be set by the client at all # some statuses cannot be set by the client at all
raise NotImplementedError() raise NotImplementedError()
# ### implement get status which checks the status of the domain object on error it logs but goes with whatever the status is
# def get_status(self):
# try:
# DomainInfoReq
# response=send
# response.statuses
# for status in status:
# if status==serverhold and self.state!=serverhld
# transition to serverhold
# if status ==client & self.state!=clientHold:
# transition to clienthold
# except:
# logger
# return self.state
@Cache @Cache
def registrant_contact(self) -> PublicContact: def registrant_contact(self) -> PublicContact:
"""Get or set the registrant for this domain.""" """Get or set the registrant for this domain."""
@ -373,7 +356,7 @@ class Domain(TimeStampedModel, DomainHelper):
@registrant_contact.setter # type: ignore @registrant_contact.setter # type: ignore
def registrant_contact(self, contact: PublicContact): def registrant_contact(self, contact: PublicContact):
"""Registrant is set when a domain is created, so follow on additions will update the current registrant""" """Registrant is set when a domain is created, so follow on additions will update the current registrant"""
###incorrect should update an existing registrant
logger.info("making registrant contact") logger.info("making registrant contact")
self._set_singleton_contact( self._set_singleton_contact(
contact=contact, expectedType=contact.ContactTypeChoices.REGISTRANT contact=contact, expectedType=contact.ContactTypeChoices.REGISTRANT
@ -386,16 +369,12 @@ class Domain(TimeStampedModel, DomainHelper):
@administrative_contact.setter # type: ignore @administrative_contact.setter # type: ignore
def administrative_contact(self, contact: PublicContact): def administrative_contact(self, contact: PublicContact):
# call CreateContact, if contact doesn't exist yet for domain
# call UpdateDomain with contact,
# type options are[admin, billing, tech, security]
# use admin as type parameter for this contact
logger.info("making admin contact") logger.info("making admin contact")
if contact.contact_type != contact.ContactTypeChoices.ADMINISTRATIVE: if contact.contact_type != contact.ContactTypeChoices.ADMINISTRATIVE:
raise ValueError( raise ValueError(
"Cannot set a registrant contact with a different contact type" "Cannot set a registrant contact with a different contact type"
) )
logger.info("administrative_contact()-> update domain with admin contact")
self._make_contact_in_registry(contact=contact) self._make_contact_in_registry(contact=contact)
self._update_domain_with_contact(contact, rem=False) self._update_domain_with_contact(contact, rem=False)
@ -423,13 +402,13 @@ class Domain(TimeStampedModel, DomainHelper):
logger.error( logger.error(
"Error updating contact, code was %s error was %s" % (e.code, e) "Error updating contact, code was %s error was %s" % (e.code, e)
) )
# add more error handling here #TODO - ticket 433 human readable error handling here
# ticket for error handling in epp
def _update_domain_with_contact(self, contact: PublicContact, rem=False): def _update_domain_with_contact(self, contact: PublicContact, rem=False):
# TODO - consider making this use both add and rem at the same time, separating it out may not be needed # TODO - consider making this use both add and rem at the same time, separating it out may not be needed
#good addition for ticket 850
logger.info("received type %s " % contact.contact_type) logger.info("_update_domain_with_contact() received type %s " % contact.contact_type)
domainContact = epp.DomainContact( domainContact = epp.DomainContact(
contact=contact.registry_id, type=contact.contact_type contact=contact.registry_id, type=contact.contact_type
) )
@ -438,7 +417,6 @@ class Domain(TimeStampedModel, DomainHelper):
if rem: if rem:
updateDomain = commands.UpdateDomain(name=self.name, rem=[domainContact]) updateDomain = commands.UpdateDomain(name=self.name, rem=[domainContact])
logger.info("Send updated")
try: try:
registry.send(updateDomain, cleaned=True) registry.send(updateDomain, cleaned=True)
except RegistryError as e: except RegistryError as e:
@ -514,11 +492,12 @@ class Domain(TimeStampedModel, DomainHelper):
# TODO-error handling better here? # TODO-error handling better here?
def _set_singleton_contact(self, contact: PublicContact, expectedType: str): def _set_singleton_contact(self, contact: PublicContact, expectedType: str):
"""""" """Sets the contacts by adding them to the registry as new contacts,
logger.info( updates the contact if it is already in epp,
"_set_singleton_contact()-> contactype type being set: %s expected type is: %s" deletes any additional contacts of the matching type for this domain
% (contact, expectedType) does not create the PublicContact object, this should be made beforehand
) (call save() on a public contact to trigger the contact setters which call this function)
Raises ValueError if expected type doesn't match the contact type"""
if expectedType != contact.contact_type: if expectedType != contact.contact_type:
raise ValueError( raise ValueError(
"Cannot set a contact with a different contact type, expected type was %s" "Cannot set a contact with a different contact type, expected type was %s"
@ -531,43 +510,29 @@ class Domain(TimeStampedModel, DomainHelper):
and contact.email == "" and contact.email == ""
) )
# get publicContact objects that have the matching domain and type but a different id, should be only one # get publicContact objects that have the matching domain and type but a different id
#like in highlander we there can only be one
hasOtherContact = ( hasOtherContact = (
PublicContact.objects.exclude(registry_id=contact.registry_id) PublicContact.objects.exclude(registry_id=contact.registry_id)
.filter(domain=self, contact_type=contact.contact_type) .filter(domain=self, contact_type=contact.contact_type)
.exists() .exists()
) )
logger.info("has other contact %s" % hasOtherContact)
##if no record exists with this contact type ##if no record exists with this contact type
logger.info(
"_set_singleton_contact()-> adding contact that shouldn't exist already"
)
# make contact in registry, duplicate and errors handled there # make contact in registry, duplicate and errors handled there
errorCode = self._make_contact_in_registry(contact) errorCode = self._make_contact_in_registry(contact)
print("error code %s" % errorCode)
# if contact.contact_type==contact.ContactTypeChoices.REGISTRANT:
# logger.info("_set_singleton_contact()-> creating the registrant")
# self._make_contact_in_registry(contact) # contact is already added to the domain, but something may have changed on it
# else:
# logger.info("_set_singleton_contact()-> updating domain with the new contact")
# self._update_domain_with_contact(contact, rem=False)
# contact is already added to the domain, but something has changed on it
# TODO - check here if contact already exists on domain in registry
# if domain has registrant and type is registrant this will be true,
# if type is anything else it should be in the contact list
alreadyExistsInRegistry = errorCode == ErrorCode.OBJECT_EXISTS alreadyExistsInRegistry = errorCode == ErrorCode.OBJECT_EXISTS
print("already exists is %s" % alreadyExistsInRegistry)
# if an error occured besides duplication, stop # if an error occured besides duplication, stop
if ( if (
not alreadyExistsInRegistry not alreadyExistsInRegistry
and errorCode != ErrorCode.COMMAND_COMPLETED_SUCCESSFULLY and errorCode != ErrorCode.COMMAND_COMPLETED_SUCCESSFULLY
): ):
#TODO- ticket #433 look here for error handling
raise Exception("Unable to add contact to registry") raise Exception("Unable to add contact to registry")
# contact doesn't exist on the domain yet # contact doesn't exist on the domain yet
logger.info("_set_singleton_contact()-> contact has been added to the registry") logger.info("_set_singleton_contact()-> contact has been added to the registry")
@ -594,38 +559,39 @@ class Domain(TimeStampedModel, DomainHelper):
# remove the old contact and add a new one # remove the old contact and add a new one
try: try:
self._update_domain_with_contact(contact=existing_contact, rem=True) self._update_domain_with_contact(contact=existing_contact, rem=True)
print("deleting %s " % existing_contact)
existing_contact.delete() existing_contact.delete()
print("after deleting")
if isEmptySecurity: if isEmptySecurity:
# add new security # security is empty so set the default security object again
self.get_default_security_contact().save() self.get_default_security_contact().save()
except Exception as err: except Exception as err:
logger.error( logger.error(
"Raising error after removing and adding a new contact" "Raising error after removing and adding a new contact"
) )
raise (err) raise (err)
# TODO- should this switch to just creating a list of ones to remove and a list of ones to add?
# other option, check if they are really singleton, can remove them? # TODO- This could switch to just creating a list of ones to remove and a list of ones to add
# if just added to registry and not a registrant add contact to domain # or Change it to add contacts before deleting the old ones
# update domain with contact or update the contact itself
if not isEmptySecurity: if not isEmptySecurity:
if not alreadyExistsInRegistry and not isRegistrant: if not alreadyExistsInRegistry and not isRegistrant:
print("UPDATING domain with the contact")
self._update_domain_with_contact(contact=contact, rem=False) self._update_domain_with_contact(contact=contact, rem=False)
# if already exists just update # if already exists just update
elif alreadyExistsInRegistry: elif alreadyExistsInRegistry:
current_contact = PublicContact.objects.filter( current_contact = PublicContact.objects.filter(
registry_id=contact.registry_id registry_id=contact.registry_id
).get() ).get()
print("updating the contact itself")
if current_contact.email != contact.email: if current_contact.email != contact.email:
self._update_epp_contact(contact=contact) self._update_epp_contact(contact=contact)
else: else:
logger.info("removing security contact and setting default again") logger.info("removing security contact and setting default again")
# get the current contact registry id for security # get the current contact registry id for security
current_contact = PublicContact.objects.filter( current_contact = PublicContact.objects.filter(
registry_id=contact.registry_id registry_id=contact.registry_id
).get() ).get()
# don't let user delete the default without adding a new email # don't let user delete the default without adding a new email
if current_contact.email != PublicContact.get_default_security().email: if current_contact.email != PublicContact.get_default_security().email:
# remove the contact # remove the contact
@ -634,7 +600,6 @@ class Domain(TimeStampedModel, DomainHelper):
# add new contact # add new contact
security_contact = self.get_default_security_contact() security_contact = self.get_default_security_contact()
security_contact.save() security_contact.save()
logger.info("done with contacts")
@security_contact.setter # type: ignore @security_contact.setter # type: ignore
def security_contact(self, contact: PublicContact): def security_contact(self, contact: PublicContact):
@ -643,7 +608,6 @@ class Domain(TimeStampedModel, DomainHelper):
from domain information (not domain application) from domain information (not domain application)
and should have the security email from DomainApplication""" and should have the security email from DomainApplication"""
logger.info("making security contact in registry") logger.info("making security contact in registry")
self._set_singleton_contact( self._set_singleton_contact(
contact, expectedType=contact.ContactTypeChoices.SECURITY contact, expectedType=contact.ContactTypeChoices.SECURITY
) )
@ -682,7 +646,7 @@ class Domain(TimeStampedModel, DomainHelper):
return secContact.email return secContact.email
def clientHoldStatus(self): def clientHoldStatus(self):
return epp.Status(state=self.Status.ON_HOLD, description="", lang="en") return epp.Status(state=self.Status.CLIENT_HOLD, description="", lang="en")
def _place_client_hold(self): def _place_client_hold(self):
"""This domain should not be active. """This domain should not be active.
@ -768,10 +732,7 @@ class Domain(TimeStampedModel, DomainHelper):
count = 0 count = 0
while not exitEarly and count < 3: while not exitEarly and count < 3:
try: try:
logger.info( logger.info("Getting domain info from epp")
"_get_or_create_domain()-> getting info on the domain, should hit an error"
)
req = commands.InfoDomain(name=self.name) req = commands.InfoDomain(name=self.name)
domainInfo = registry.send(req, cleaned=True).res_data[0] domainInfo = registry.send(req, cleaned=True).res_data[0]
exitEarly = True exitEarly = True
@ -798,12 +759,11 @@ class Domain(TimeStampedModel, DomainHelper):
registrant = PublicContact.get_default_registrant() registrant = PublicContact.get_default_registrant()
registrant.domain = self registrant.domain = self
registrant.save() ##calls the registrant_contact.setter registrant.save() ##calls the registrant_contact.setter
logger.info("registrant is %s" % registrant)
return registrant.registry_id return registrant.registry_id
@transition(field="state", source=State.UNKNOWN, target=State.DNS_NEEDED) @transition(field="state", source=State.UNKNOWN, target=State.DNS_NEEDED)
def pendingCreate(self): def pendingCreate(self):
logger.info("In make domain in registry ") logger.info("Changing to dns_needed")
registrantID = self.addRegistrant() registrantID = self.addRegistrant()
@ -814,20 +774,15 @@ class Domain(TimeStampedModel, DomainHelper):
registrant=registrantID, registrant=registrantID,
auth_info=epp.DomainAuthInfo(pw="2fooBAR123fooBaz"), # not a password auth_info=epp.DomainAuthInfo(pw="2fooBAR123fooBaz"), # not a password
) )
logger.info("_get_or_create_domain()-> about to send domain request")
logger.info(req)
try: try:
response = registry.send(req, cleaned=True) response = registry.send(req, cleaned=True)
logger.info(response)
except RegistryError as err: except RegistryError as err:
if err.code != ErrorCode.OBJECT_EXISTS: if err.code != ErrorCode.OBJECT_EXISTS:
raise err raise err
print("making all defaults")
self.addAllDefaults() self.addAllDefaults()
logger.info(
"_get_or_create_domain()-> registry received create for " + self.name
)
def addAllDefaults(self): def addAllDefaults(self):
security_contact = self.get_default_security_contact() security_contact = self.get_default_security_contact()
@ -841,23 +796,9 @@ class Domain(TimeStampedModel, DomainHelper):
administrative_contact.domain = self administrative_contact.domain = self
administrative_contact.save() administrative_contact.save()
print("security contact")
print(security_contact)
# def testSettingOtherContacts(self):
# ##delete this funciton
# logger.info("testSettingAllContacts")
# technical_contact = PublicContact.get_default_technical()
# technical_contact.domain = self
# administrative_contact = PublicContact.get_default_administrative()
# administrative_contact.domain = self
# # security_contact.save()
# technical_contact.save()
# administrative_contact.save()
@transition(field="state", source=State.DNS_NEEDED, target=State.ON_HOLD) @transition(field="state", source=State.DNS_NEEDED, target=State.ON_HOLD)
def clientHold(self): def clientHold(self):
"""place a clienthold on a domain (no longer should resolve)"""
##TODO - check to see if client hold is allowed should happen outside of this function ##TODO - check to see if client hold is allowed should happen outside of this function
# (check prohibited statuses) # (check prohibited statuses)
logger.info("clientHold()-> inside clientHold") logger.info("clientHold()-> inside clientHold")
@ -866,6 +807,7 @@ class Domain(TimeStampedModel, DomainHelper):
@transition(field="state", source=State.ON_HOLD, target=State.DNS_NEEDED) @transition(field="state", source=State.ON_HOLD, target=State.DNS_NEEDED)
def revertClientHold(self): def revertClientHold(self):
"""undo a clienthold placed on a domain"""
##TODO - check to see if client hold is allowed should happen outside of this function ##TODO - check to see if client hold is allowed should happen outside of this function
# (check prohibited statuses) # (check prohibited statuses)
logger.info("clientHold()-> inside clientHold") logger.info("clientHold()-> inside clientHold")
@ -874,6 +816,7 @@ class Domain(TimeStampedModel, DomainHelper):
@transition(field="state", source=State.ON_HOLD, target=State.DELETED) @transition(field="state", source=State.ON_HOLD, target=State.DELETED)
def deleted(self): def deleted(self):
"""domain is deleted in epp but is saved in our database"""
logger.info("pendingCreate()-> inside pending create") logger.info("pendingCreate()-> inside pending create")
self._delete_domain() self._delete_domain()
# TODO - delete ticket any additional error handling here # TODO - delete ticket any additional error handling here
@ -883,19 +826,15 @@ class Domain(TimeStampedModel, DomainHelper):
source=[State.DNS_NEEDED], source=[State.DNS_NEEDED],
target=State.READY, target=State.READY,
) )
def created(self): def ready(self):
"""Transition to the ready state
domain should have nameservers and all contacts and now should be considered live on a domain"""
# TODO - in nameservers tickets 848 and 562 check here if updates need to be made
nameserverList = self.nameservers nameserverList = self.nameservers
logger.info("created()-> inside setting create") logger.info("Changing to ready state")
if len(nameserverList) < 2 or len(nameserverList) > 13: if len(nameserverList) < 2 or len(nameserverList) > 13:
raise ValueError("Not ready to become created, cannot transition yet") raise ValueError("Not ready to become created, cannot transition yet")
logger.info("able to transition to created state") logger.info("able to transition to ready state")
# TODO - in nameservers ticket check if has everything for creation
# admin, tech and security
# 2 or more (but less than 13) nameservers
# if any of the above is violated raise the user raise a human readable error
# not there is another ticket for error handling keep a todo here if
# user friendly error portion is postponed
def _disclose_fields(self, contact: PublicContact): def _disclose_fields(self, contact: PublicContact):
"""creates a disclose object that can be added to a contact Create using """creates a disclose object that can be added to a contact Create using
@ -904,19 +843,11 @@ class Domain(TimeStampedModel, DomainHelper):
isSecurity = contact.contact_type == contact.ContactTypeChoices.SECURITY isSecurity = contact.contact_type == contact.ContactTypeChoices.SECURITY
DF = epp.DiscloseField DF = epp.DiscloseField
fields = {DF.FAX, DF.VOICE, DF.ADDR} fields = {DF.FAX, DF.VOICE, DF.ADDR}
print("can you see me ho")
logger.info("isSecurity %s" % isSecurity)
logger.info("contact email %s" % contact.email)
logger.info(
"contact email is default %s" % isSecurity
and contact.email == PublicContact.get_default_security().email
)
if not isSecurity or ( if not isSecurity or (
isSecurity and contact.email == PublicContact.get_default_security().email isSecurity and contact.email == PublicContact.get_default_security().email
): ):
fields.add(DF.EMAIL) fields.add(DF.EMAIL)
print("added email, fields is %s" % fields)
print("fields is now %s " % fields)
return epp.Disclose( return epp.Disclose(
flag=False, flag=False,
fields=fields, fields=fields,
@ -944,9 +875,7 @@ class Domain(TimeStampedModel, DomainHelper):
def _make_contact_in_registry(self, contact: PublicContact): def _make_contact_in_registry(self, contact: PublicContact):
"""Create the contact in the registry, ignore duplicate contact errors """Create the contact in the registry, ignore duplicate contact errors
returns int corresponding to ErrorCode values""" returns int corresponding to ErrorCode values"""
logger.info(contact)
logger.info(contact.registry_id)
print("***CREATING THE CCONTACT")
create = commands.CreateContact( create = commands.CreateContact(
id=contact.registry_id, id=contact.registry_id,
postal_info=self._make_epp_contact_postal_info(contact=contact), postal_info=self._make_epp_contact_postal_info(contact=contact),
@ -956,16 +885,12 @@ class Domain(TimeStampedModel, DomainHelper):
auth_info=epp.ContactAuthInfo(pw="2fooBAR123fooBaz"), auth_info=epp.ContactAuthInfo(pw="2fooBAR123fooBaz"),
) )
# security contacts should only show email addresses, for now # security contacts should only show email addresses, for now
print("calling disclose fields")
create.disclose = self._disclose_fields(contact=contact) create.disclose = self._disclose_fields(contact=contact)
try: try:
logger.info("sending contact")
registry.send(create, cleaned=True) registry.send(create, cleaned=True)
print("sendding successfully")
return ErrorCode.COMMAND_COMPLETED_SUCCESSFULLY return ErrorCode.COMMAND_COMPLETED_SUCCESSFULLY
except RegistryError as err: except RegistryError as err:
# don't throw an error if it is just saying this is a duplicate contact # don't throw an error if it is just saying this is a duplicate contact
print("threw error")
if err.code != ErrorCode.OBJECT_EXISTS: if err.code != ErrorCode.OBJECT_EXISTS:
logger.error( logger.error(
"Registry threw error for contact id %s contact type is %s, error code is\n %s full error is %s", "Registry threw error for contact id %s contact type is %s, error code is\n %s full error is %s",
@ -1022,7 +947,6 @@ class Domain(TimeStampedModel, DomainHelper):
"""Contact registry for info about a domain.""" """Contact registry for info about a domain."""
try: try:
# get info from registry # get info from registry
logger.info("_fetch_cache()-> fetching from cache, should create domain")
data = self._get_or_create_domain() data = self._get_or_create_domain()
# extract properties from response # extract properties from response
# (Ellipsis is used to mean "null") # (Ellipsis is used to mean "null")
@ -1041,7 +965,6 @@ class Domain(TimeStampedModel, DomainHelper):
# remove null properties (to distinguish between "a value of None" and null) # remove null properties (to distinguish between "a value of None" and null)
cleaned = {k: v for k, v in cache.items() if v is not ...} cleaned = {k: v for k, v in cache.items() if v is not ...}
logger.info("_fetch_cache()-> cleaned is " + str(cleaned))
# statuses can just be a list no need to keep the epp object # statuses can just be a list no need to keep the epp object
if "statuses" in cleaned.keys(): if "statuses" in cleaned.keys():
@ -1066,8 +989,6 @@ class Domain(TimeStampedModel, DomainHelper):
# extract properties from response # extract properties from response
# (Ellipsis is used to mean "null") # (Ellipsis is used to mean "null")
logger.info("_fetch_cache()->contacts are ")
logger.info(data)
contact = { contact = {
"id": id, "id": id,
"type": domainContact.type, "type": domainContact.type,
@ -1086,10 +1007,7 @@ class Domain(TimeStampedModel, DomainHelper):
cleaned["contacts"].append( cleaned["contacts"].append(
{k: v for k, v in contact.items() if v is not ...} {k: v for k, v in contact.items() if v is not ...}
) )
logger.info(
"_fetch_cache()-> after getting contacts cleaned is "
+ str(cleaned)
)
# get nameserver info, if there are any # get nameserver info, if there are any
if ( if (
@ -1121,7 +1039,6 @@ class Domain(TimeStampedModel, DomainHelper):
) )
# replace the prior cache with new data # replace the prior cache with new data
logger.info("cache at the end of fetch is %s" % str(cache))
self._cache = cleaned self._cache = cleaned
except RegistryError as e: except RegistryError as e: