exception handling fix
This commit is contained in:
		
					parent
					
						
							
								f4766c7d7c
							
						
					
				
			
			
				commit
				
					
						1eff51099c
					
				
			
		
					 1 changed files with 2 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -967,11 +967,8 @@ class VirtualMachineView(LoginRequiredMixin, View):
 | 
			
		|||
 | 
			
		||||
        try:
 | 
			
		||||
            vm_data = VirtualMachineSerializer(manager.get_vm(vm.id)).data
 | 
			
		||||
        except BaseException:
 | 
			
		||||
            return redirect(
 | 
			
		||||
                reverse('hosting:virtual_machines',
 | 
			
		||||
                        kwargs={'pk': opennebula_vm_id})
 | 
			
		||||
            )
 | 
			
		||||
        except WrongIdError:
 | 
			
		||||
            return redirect(reverse('hosting:virtual_machines'))
 | 
			
		||||
 | 
			
		||||
        terminated = manager.delete_vm(vm.id)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue