mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-06-29 15:53:31 +02:00
Add a failure message when there is no EPP connection
This commit is contained in:
parent
e6c44b2d9b
commit
f334e516f1
1 changed files with 9 additions and 0 deletions
|
@ -306,6 +306,15 @@ class DomainSecurityEmailView(DomainPermissionView, FormMixin):
|
||||||
|
|
||||||
domain = self.get_object()
|
domain = self.get_object()
|
||||||
contact = domain.security_contact
|
contact = domain.security_contact
|
||||||
|
|
||||||
|
# If no default is created for security_contact,
|
||||||
|
# then we cannot connect to EPPLib.
|
||||||
|
if contact is None:
|
||||||
|
messages.error(
|
||||||
|
self.request, "Update failed. Cannot contact the registry."
|
||||||
|
)
|
||||||
|
return redirect(self.get_success_url())
|
||||||
|
|
||||||
contact.email = new_email
|
contact.email = new_email
|
||||||
contact.save()
|
contact.save()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue