Update domain.py

This commit is contained in:
zandercymatics 2025-03-14 14:48:04 -06:00
parent e8ac747ddc
commit 24eadb8135
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7

View file

@ -1781,13 +1781,13 @@ class Domain(TimeStampedModel, DomainHelper):
"""Try to fetch info about a contact. Create it if it does not exist."""
logger.info("_get_or_create_contact() -> Fetching contact info")
try:
return self._request_contact_info(contact=contact)
return self._request_contact_info(contact)
except RegistryError as e:
if e.code == ErrorCode.OBJECT_DOES_NOT_EXIST:
logger.info("_get_or_create_contact()-> contact doesn't exist so making it")
contact.domain = self
contact.save() # this will call the function based on type of contact
return self._request_contact_info(contact)
return self._request_contact_info(contact=contact)
else:
logger.error(
"Registry threw error for contact id %s"