summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2018-02-21 10:04:42 -0800
committerMichael Kozono <mkozono@gmail.com>2018-02-21 10:04:42 -0800
commit0c357ac83b941e3a3b5d13e8430ec555b384b967 (patch)
tree6c387ce935bd0079051410b59a14bbd309d77190
parent3f017f07ee27a90984255948f7979390b17e20ae (diff)
downloadgitlab-ce-mk-improve-background-migration-specs.tar.gz
Use convenient Rails helpermk-improve-background-migration-specs
-rw-r--r--lib/gitlab/background_migration/populate_untracked_uploads.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/background_migration/populate_untracked_uploads.rb b/lib/gitlab/background_migration/populate_untracked_uploads.rb
index c5415bf0f9a..9232f20a063 100644
--- a/lib/gitlab/background_migration/populate_untracked_uploads.rb
+++ b/lib/gitlab/background_migration/populate_untracked_uploads.rb
@@ -83,7 +83,7 @@ module Gitlab
end
ids.each do |model_type, model_ids|
- model_class = Object.const_get("Gitlab::BackgroundMigration::PopulateUntrackedUploadsDependencies::#{model_type}")
+ model_class = "Gitlab::BackgroundMigration::PopulateUntrackedUploadsDependencies::#{model_type}".constantize
found_ids = model_class.where(id: model_ids.uniq).pluck(:id)
deleted_ids = ids[model_type] - found_ids
ids[model_type] = deleted_ids