Don't use VirtualMachineSerializer for obtaining users_vms
This commit is contained in:
		
					parent
					
						
							
								496178f44c
							
						
					
				
			
			
				commit
				
					
						1ebfc8b2dc
					
				
			
		
					 1 changed files with 1 additions and 2 deletions
				
			
		|  | @ -1782,8 +1782,7 @@ class CheckUserVM(APIView): | |||
|             # not the best way to lookup vms by ip | ||||
|             # TODO: make this optimal | ||||
|             vms = manager.get_vms() | ||||
|             users_vms = [VirtualMachineSerializer(vm).data for vm in vms | ||||
|                          if vm.uname == email] | ||||
|             users_vms = [vm for vm in vms if vm.uname == email] | ||||
|             if len(users_vms) == 0: | ||||
|                 return Response('No VM found with the given email address', | ||||
|                                 404) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue