mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-25 20:18:38 +02:00
fixed reference before assignment error
This commit is contained in:
parent
4050803baa
commit
b2cfc4e8bc
1 changed files with 4 additions and 3 deletions
|
@ -1489,20 +1489,21 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
updateReq = commands.UpdateDomain(
|
||||
name=self.name, rem=hostsToDelete, add=hostsToAdd
|
||||
)
|
||||
response = registry.send(updateReq, cleaned=True)
|
||||
|
||||
logger.info(
|
||||
"addAndRemoveHostsFromDomain()-> sending update domain req as %s"
|
||||
% updateReq
|
||||
)
|
||||
response = registry.send(updateReq, cleaned=True)
|
||||
|
||||
return response.code
|
||||
except RegistryError as e:
|
||||
logger.error(
|
||||
"Error addAndRemoveHostsFromDomain, code was %s error was %s"
|
||||
% (e.code, e)
|
||||
)
|
||||
|
||||
return response.code
|
||||
return e.code
|
||||
|
||||
|
||||
def _delete_hosts_if_not_used(self, hostsToDelete: list[str]):
|
||||
"""delete the host object in registry,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue