

def get_object(self):
    if (not hasattr(self, '_object')):
        try:
            self._object = api.nova.server_get(self.request, self.kwargs['instance_id'])
        except Exception:
            redirect = reverse('horizon:project:instances:index')
            exceptions.handle(self.request, _('Unable to retrieve instance.'), redirect=redirect)
    return self._object

dataset/ETHPy150Open Havate/havate-openstack/proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/dashboards/project/images_and_snapshots/snapshots/views.py CreateView.get_object/original