Commit 0c357ac8 authored by Michael Kozono's avatar Michael Kozono

Use convenient Rails helper

parent 3f017f07
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment