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'))
 | 
			
		||||
        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(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue