remove unecessary try/catch

This commit is contained in:
rachidatecs 2023-05-18 17:09:19 -04:00
parent 1436eb12bd
commit c07d858b18
No known key found for this signature in database
GPG key ID: 3CEBBFA7325E5525

View file

@ -130,11 +130,7 @@ class DomainSecurityEmailView(DomainPermission, FormMixin, DetailView):
"""The form is valid, call setter in model."""
# Set the security email from the form
new_email = ""
try:
new_email = form.cleaned_data["security_email"]
except KeyError:
pass
new_email = form.cleaned_data["security_email"]
domain = self.get_object()
domain.set_security_email(new_email)