Update src/registrar/views/application.py

Co-authored-by: Alysia Broddrick <109625347+abroddrick@users.noreply.github.com>
This commit is contained in:
zandercymatics 2024-01-23 08:18:20 -07:00 committed by GitHub
parent 8a75c8fcd6
commit c07e83b77d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -679,7 +679,7 @@ class DomainApplicationDeleteView(DomainApplicationPermissionDeleteView):
submitter = self._get_contacts_by_id([submitter.id]).first() if submitter is not None else None 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) 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 = [(ao, "authorizing_official"), (submitter, "submitted_applications")]
checked_contacts.extend((contact, "contact_applications") for contact in other_contacts) checked_contacts.extend((contact, "contact_applications") for contact in other_contacts)