Improved the condition of fetching key name
This commit is contained in:
		
					parent
					
						
							
								01795dcad0
							
						
					
				
			
			
				commit
				
					
						d92e850f3e
					
				
			
		
					 1 changed files with 1 additions and 0 deletions
				
			
		|  | @ -98,6 +98,7 @@ class UserHostingKeyForm(forms.ModelForm): | |||
| 
 | ||||
|         if openssh_pubkey_str in get_all_public_keys(self.request.user): | ||||
|             key_name = UserHostingKey.objects.filter( | ||||
|                 user_id=self.request.user.id, | ||||
|                 public_key=openssh_pubkey_str).first().name | ||||
|             KEY_EXISTS_MESSAGE = _( | ||||
|                 "This key exists already with the name %(name)s") % { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue