modified the error message; updated the formatting of the code

This commit is contained in:
David Kennedy 2023-11-08 13:21:09 -05:00
parent b84fdedc40
commit f45cee3eb4
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
3 changed files with 6 additions and 6 deletions

View file

@ -26,9 +26,9 @@
{% if not domain.domain_info %}
<div class="usa-alert usa-alert--error margin-bottom-2">
<div class="usa-alert__body">
<h4 class="usa-alert__heading larger-font-sizing">Error!</h4>
<h4 class="usa-alert__heading larger-font-sizing">Domain missing domain information</h4>
<p class="usa-alert__text ">
You are attempting to manage a domain, {{ domain.name }}, which does not have a Domain Information object. Please correct this in the admin.
You are attempting to manage a domain, {{ domain.name }}, which does not have a domain information object. Please correct this in the admin by editing the domain, and adding domain information, as appropriate.
</p>
</div>
</div>

View file

@ -1293,8 +1293,8 @@ class TestDomainOverview(TestWithDomainPermissions, WebTest):
# in the session to emulate user clicking Manage Domain
# in the admin interface
session = self.client.session
session['analyst_action'] = 'foo'
session['analyst_action_location'] = self.domain_no_information.id
session["analyst_action"] = "foo"
session["analyst_action_location"] = self.domain_no_information.id
session.save()
detail_page = self.client.get(
@ -1302,7 +1302,7 @@ class TestDomainOverview(TestWithDomainPermissions, WebTest):
)
self.assertContains(detail_page, "noinformation.gov")
self.assertContains(detail_page, "Error")
self.assertContains(detail_page, "Domain missing domain information")
class TestDomainManagers(TestDomainOverview):

View file

@ -99,7 +99,7 @@ class DomainPermission(PermissionsLoginMixin):
requested_domain = None
if DomainInformation.objects.filter(id=pk).exists():
requested_domain = DomainInformation.objects.get(id=pk)
# if no domain information or application exist, the user
# should be able to manage the domain; however, if domain information
# and domain application exist, and application is not in valid status,