mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-06 09:45:23 +02:00
Merge branch 'za/1501-users-delete-domain-records' of https://github.com/cisagov/manage.get.gov into za/1501-users-delete-domain-records
This commit is contained in:
commit
0d238e8793
2 changed files with 2 additions and 1 deletions
|
@ -236,6 +236,7 @@ class LoggedInTests(TestWithUser):
|
|||
# Trigger the delete logic
|
||||
response = self.client.post(reverse("application-delete", kwargs={"pk": application.pk}), follow=True)
|
||||
|
||||
# igorville is now deleted
|
||||
self.assertNotContains(response, "igorville.gov")
|
||||
|
||||
# Check if the orphaned contact was deleted
|
||||
|
|
|
@ -694,7 +694,7 @@ class DomainApplicationDeleteView(DomainApplicationPermissionDeleteView):
|
|||
submitter = self._get_contacts_by_id([submitter.id]).first() if submitter is not None else None
|
||||
other_contacts = self._get_contacts_by_id(other_contact_ids)
|
||||
|
||||
# Pair each contact with its related name
|
||||
# Pair each contact with its db related name for use in checking if it has joins
|
||||
checked_contacts = [(ao, "authorizing_official"), (submitter, "submitted_applications")]
|
||||
checked_contacts.extend((contact, "contact_applications") for contact in other_contacts)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue