mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-21 18:25:58 +02:00
Linter
This commit is contained in:
parent
c5f66fe774
commit
13e966fbca
2 changed files with 10 additions and 10 deletions
|
@ -1307,15 +1307,17 @@ class Domain(TimeStampedModel, DomainHelper):
|
||||||
choices.TECHNICAL: None,
|
choices.TECHNICAL: None,
|
||||||
}
|
}
|
||||||
registrant_id = ...
|
registrant_id = ...
|
||||||
existing_contacts = PublicContact.objects.filter(
|
existing_contacts = PublicContact.objects.filter(domain=self)
|
||||||
domain=self
|
|
||||||
)
|
|
||||||
if existing_contacts.count() > 0:
|
if existing_contacts.count() > 0:
|
||||||
for choice in contacts_dict:
|
for choice in contacts_dict:
|
||||||
contacts_dict[choice] = existing_contacts.get(contact_type=choice).registry_id
|
contacts_dict[choice] = existing_contacts.get(
|
||||||
|
contact_type=choice
|
||||||
|
).registry_id
|
||||||
# Edge case for registrant
|
# Edge case for registrant
|
||||||
registrant = PublicContact.ContactTypeChoices.REGISTRANT
|
registrant = PublicContact.ContactTypeChoices.REGISTRANT
|
||||||
registrant_id = existing_contacts.get(contact_type=registrant).registry_id
|
registrant_id = existing_contacts.get(
|
||||||
|
contact_type=registrant
|
||||||
|
).registry_id
|
||||||
|
|
||||||
cache = {
|
cache = {
|
||||||
"auth_info": getattr(data, "auth_info", ...),
|
"auth_info": getattr(data, "auth_info", ...),
|
||||||
|
@ -1333,9 +1335,9 @@ class Domain(TimeStampedModel, DomainHelper):
|
||||||
|
|
||||||
self._cache = cleaned
|
self._cache = cleaned
|
||||||
else:
|
else:
|
||||||
|
logger.error("Unknown TransitionNotAllowed exception")
|
||||||
raise err
|
raise err
|
||||||
|
|
||||||
|
|
||||||
def _get_or_create_public_contact(self, public_contact: PublicContact):
|
def _get_or_create_public_contact(self, public_contact: PublicContact):
|
||||||
"""Tries to find a PublicContact object in our DB.
|
"""Tries to find a PublicContact object in our DB.
|
||||||
If it can't, it'll create it. Returns PublicContact"""
|
If it can't, it'll create it. Returns PublicContact"""
|
||||||
|
|
|
@ -310,9 +310,7 @@ class DomainSecurityEmailView(DomainPermissionView, FormMixin):
|
||||||
# If no default is created for security_contact,
|
# If no default is created for security_contact,
|
||||||
# then we cannot connect to EPPLib.
|
# then we cannot connect to EPPLib.
|
||||||
if contact is None:
|
if contact is None:
|
||||||
messages.error(
|
messages.error(self.request, "Update failed. Cannot contact the registry.")
|
||||||
self.request, "Update failed. Cannot contact the registry."
|
|
||||||
)
|
|
||||||
return redirect(self.get_success_url())
|
return redirect(self.get_success_url())
|
||||||
|
|
||||||
contact.email = new_email
|
contact.email = new_email
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue