updated validation and removal of whitespace; raise RegistryErrors on create_host and update_host

This commit is contained in:
David Kennedy 2023-10-30 14:23:14 -04:00
parent 89a65e597f
commit 91e2a7906b
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
3 changed files with 4 additions and 6 deletions

View file

@ -277,7 +277,7 @@ class Domain(TimeStampedModel, DomainHelper):
return response.code
except RegistryError as e:
logger.error("Error _create_host, code was %s error was %s" % (e.code, e))
return e.code
raise e
def _convert_list_to_dict(self, listToConvert: list[tuple[str, list]]):
"""converts a list of hosts into a dictionary
@ -1593,7 +1593,7 @@ class Domain(TimeStampedModel, DomainHelper):
return response.code
except RegistryError as e:
logger.error("Error _update_host, code was %s error was %s" % (e.code, e))
return e.code
raise e
def addAndRemoveHostsFromDomain(
self, hostsToAdd: list[str], hostsToDelete: list[str]