From ce630573e027fdea9a6cad8c31bf6620e2b5bc89 Mon Sep 17 00:00:00 2001 From: William Colmenares Date: Thu, 16 May 2019 13:33:31 -0400 Subject: [PATCH] Remove print statement & correct code return --- hosting/views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hosting/views.py b/hosting/views.py index b0cee45c..88adaf22 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -1773,7 +1773,6 @@ class CheckUserVM(APIView): user = request.data['user'] realm = request.data['realm'] token = request.data['token'] - print(settings.ACCOUNT_NAME) if user != settings.ACCOUNT_NAME: return Response("User not allowed", 403) response = check_otp(user, realm, token) @@ -1784,8 +1783,8 @@ class CheckUserVM(APIView): for i in range(len(uservms)): if uservms[i].ipv4 == ip or uservms[i].ipv6 == ip: return Response('success', 200) - return Response('No VM found matching the ip address provided', 403) + return Response('No VM found matching the ip address provided', 404) else: - return Response('No VM found with the given email address', 403) + return Response('No VM found with the given email address', 404) except KeyError: return Response('Not enough data provided', 400)