diff options
author | Nick Thomas <nick@gitlab.com> | 2019-02-04 15:52:22 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-02-04 15:52:22 +0300 |
commit | 3dadb1f870d6fb04375a9b0cd8bd1dd53b4cca25 (patch) | |
tree | 5eb587deca2955406c1a6ecd0d0ac68ec42b4f60 /app/models/ssh_host_key.rb | |
parent | 2b0f4df0217b4a4aee53f964610d66ceedb68dca (diff) |
Allow SshHostKey.find_by to accept string keys
Diffstat (limited to 'app/models/ssh_host_key.rb')
-rw-r--r-- | app/models/ssh_host_key.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/ssh_host_key.rb b/app/models/ssh_host_key.rb index f318d32c71c..fd23cc9ac87 100644 --- a/app/models/ssh_host_key.rb +++ b/app/models/ssh_host_key.rb @@ -26,6 +26,7 @@ class SshHostKey self.reactive_cache_lifetime = 10.minutes def self.find_by(opts = {}) + opts = HashWithIndifferentAccess.new(opts) return nil unless opts.key?(:id) project_id, url = opts[:id].split(':', 2) |