From 45df525a37ad958a0e3bc320eb19d9b2e8b469ab Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Wed, 27 Sep 2017 03:38:39 +0530 Subject: [PATCH] vm cancel name fix --- hosting/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hosting/views.py b/hosting/views.py index 3358ebaf..f994181e 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -1056,6 +1056,7 @@ class VirtualMachineView(LoginRequiredMixin, View): try: vm_data = VirtualMachineSerializer(manager.get_vm(vm.id)).data + vm_name = vm_data.name except WrongIdError: return redirect(reverse('hosting:virtual_machines')) @@ -1077,7 +1078,7 @@ class VirtualMachineView(LoginRequiredMixin, View): else: sleep(2) context = { - 'vm_name': vm_data.name, + 'vm_name': vm_name, 'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()), 'page_header': _('Virtual Machine Cancellation')