This commit is contained in:
David Kennedy 2024-06-05 16:18:58 -04:00
parent 6b6c7b2983
commit 51a980befe
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B

View file

@ -798,12 +798,10 @@ class DomainRequestDeleteView(DomainRequestPermissionDeleteView):
domain_request: DomainRequest = self.get_object() domain_request: DomainRequest = self.get_object()
contacts_to_delete, duplicates = self._get_orphaned_contacts(domain_request) contacts_to_delete, duplicates = self._get_orphaned_contacts(domain_request)
# Delete the DomainRequest
self.object = self.get_object() self.object = self.get_object()
self.object.delete() self.object.delete()
# Delete the DomainRequest
# response = super().post(request, *args, **kwargs)
# Delete orphaned contacts - but only for if they are not associated with a user # Delete orphaned contacts - but only for if they are not associated with a user
Contact.objects.filter(id__in=contacts_to_delete, user=None).delete() Contact.objects.filter(id__in=contacts_to_delete, user=None).delete()