From 1ebfc8b2dcf392958e14cde0075946ad231a889d Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 10 Jun 2019 14:51:40 +0200 Subject: [PATCH] Don't use VirtualMachineSerializer for obtaining users_vms --- hosting/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hosting/views.py b/hosting/views.py index 11a4b8bc..4c6ea04d 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -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)