Add missing return statements for error
This commit is contained in:
parent
219bfbda12
commit
bbe0017fa0
1 changed files with 3 additions and 3 deletions
|
@ -1530,13 +1530,13 @@ class AddSshKeyToVMView(LoginRequiredMixin, View):
|
||||||
vm_id = int(self.kwargs.get('pk'))
|
vm_id = int(self.kwargs.get('pk'))
|
||||||
except ValueError as ve:
|
except ValueError as ve:
|
||||||
logger.error("Value error {}".format(str(ve)))
|
logger.error("Value error {}".format(str(ve)))
|
||||||
self.respond_with_error()
|
return self.respond_with_error()
|
||||||
if 'selected_key' not in request.POST:
|
if 'selected_key' not in request.POST:
|
||||||
self.respond_with_error()
|
return self.respond_with_error()
|
||||||
else:
|
else:
|
||||||
posted_keys = parse.unquote_plus(request.POST['selected_key'])
|
posted_keys = parse.unquote_plus(request.POST['selected_key'])
|
||||||
if posted_keys.strip() == "":
|
if posted_keys.strip() == "":
|
||||||
self.respond_with_error()
|
return self.respond_with_error()
|
||||||
keys = posted_keys.split(",")
|
keys = posted_keys.split(",")
|
||||||
uh_keys = [
|
uh_keys = [
|
||||||
UserHostingKey.objects.get(
|
UserHostingKey.objects.get(
|
||||||
|
|
Loading…
Reference in a new issue