vm cancel name fix
This commit is contained in:
parent
96f24881fe
commit
45df525a37
1 changed files with 2 additions and 1 deletions
|
@ -1056,6 +1056,7 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
vm_data = VirtualMachineSerializer(manager.get_vm(vm.id)).data
|
vm_data = VirtualMachineSerializer(manager.get_vm(vm.id)).data
|
||||||
|
vm_name = vm_data.name
|
||||||
except WrongIdError:
|
except WrongIdError:
|
||||||
return redirect(reverse('hosting:virtual_machines'))
|
return redirect(reverse('hosting:virtual_machines'))
|
||||||
|
|
||||||
|
@ -1077,7 +1078,7 @@ class VirtualMachineView(LoginRequiredMixin, View):
|
||||||
else:
|
else:
|
||||||
sleep(2)
|
sleep(2)
|
||||||
context = {
|
context = {
|
||||||
'vm_name': vm_data.name,
|
'vm_name': vm_name,
|
||||||
'base_url': "{0}://{1}".format(self.request.scheme,
|
'base_url': "{0}://{1}".format(self.request.scheme,
|
||||||
self.request.get_host()),
|
self.request.get_host()),
|
||||||
'page_header': _('Virtual Machine Cancellation')
|
'page_header': _('Virtual Machine Cancellation')
|
||||||
|
|
Loading…
Reference in a new issue