def get_object(self, *args, **kwargs):
        obj = super(OwnedObjectMixin, self).get_object(*args, **kwargs)

        try:
            if not obj.owner == self.request.user:
                raise Http404()
        except __HOLE__:
            pass

        return obj
dataset/ETHPy150Open matagus/django-planet/planet/views.py/OwnedObjectMixin.get_object