Fix ssh key update logic. Refs #2162
This commit is contained in:
parent
8b2fdd71c7
commit
6b993db2fc
|
@ -41,7 +41,7 @@ class User < ActiveRecord::Base
|
|||
create_ssh_key ssh_key
|
||||
elsif ssh_key_was.present? and ssh_key.blank?
|
||||
destroy_ssh_key ssh_key_was
|
||||
elsif ssh_key_changed?
|
||||
elsif ssh_key_changed? and ssh_key.present? and ssh_key_was.present?
|
||||
update_ssh_key ssh_key_was, ssh_key
|
||||
end
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue