Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-02-03 16:52:55 +0300
committerStan Hu <stanhu@gmail.com>2019-02-03 17:12:05 +0300
commit4c1231accab556da202a6a7b3e54b3ca0734cefb (patch)
tree64f1ec71aff0a5d18abd996e6a9664c076162236 /app/models/ssh_host_key.rb
parent0cc5e956fcb9393829e537a20be8da89a275ec1d (diff)
Fix SSH Detect Host Keys not working
Due to a change in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/24245, the Detect Host Key feature in the SSH mirroring stopped working. `SshHostKey#primary_key` was being used instead of the hard-coded `:id`. However, `SshHostKey#find_by` was expecting the symbolized `:id` rather than the string `id`, so it could never find the host key it was supposed to update. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56855
Diffstat (limited to 'app/models/ssh_host_key.rb')
-rw-r--r--app/models/ssh_host_key.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ssh_host_key.rb b/app/models/ssh_host_key.rb
index 99a0c54a26a..f318d32c71c 100644
--- a/app/models/ssh_host_key.rb
+++ b/app/models/ssh_host_key.rb
@@ -54,7 +54,7 @@ class SshHostKey
# Needed for reactive caching
def self.primary_key
- 'id'
+ :id
end
def id