From bbe0017fa010e4167f7b936b5e63dc3a6bd9e1fb Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 12 May 2019 21:15:15 +0200 Subject: [PATCH] Add missing return statements for error --- hosting/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hosting/views.py b/hosting/views.py index 7a1c6e50..5f75f2b9 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -1530,13 +1530,13 @@ class AddSshKeyToVMView(LoginRequiredMixin, View): vm_id = int(self.kwargs.get('pk')) except ValueError as ve: logger.error("Value error {}".format(str(ve))) - self.respond_with_error() + return self.respond_with_error() if 'selected_key' not in request.POST: - self.respond_with_error() + return self.respond_with_error() else: posted_keys = parse.unquote_plus(request.POST['selected_key']) if posted_keys.strip() == "": - self.respond_with_error() + return self.respond_with_error() keys = posted_keys.split(",") uh_keys = [ UserHostingKey.objects.get(