def METHOD_NAME(self, request, pk):
    """Delete a cred."""
    try:
        source = Source.objects.get(pk=pk)
        scans = Scan.objects.filter(sources__pk=pk).values(IDENTIFIER_KEY, NAME_KEY)
        if scans:
            message = messages.SOURCE_DELETE_NOT_VALID_W_SCANS
            error = {"detail": message}
            slim_scans = []
            for scan in scans:
                slim_scans.append(scan)
            error["scans"] = slim_scans
            raise ValidationError(error)
        source.delete()
        return Response(status=status.HTTP_204_NO_CONTENT)
    except Source.DoesNotExist as exception:
        raise Http404 from exception