def get_object(self):
        if 'pk' in self.kwargs:
            return get_object_or_404(
                WebhookTarget,
                pk=self.kwargs['pk'],
                owner=self.request.user

            )
        if 'identifier' in self.kwargs:
            return get_object_or_404(
                WebhookTarget,
                pk=self.kwargs['identifier'],
                owner=self.request.user
            )
        raise Http404
dataset/ETHPy150Open pydanny/dj-webhooks/djwebhooks/views.py/ProtectedWebhookTargetRedisDetailView.get_object/original