Commit aa8b5e94 authored by Matt Kasa's avatar Matt Kasa

Fix use of ActiveRecord::Base in RepositoryCheck

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/350651
parent b1072b3f
...@@ -25,7 +25,6 @@ Database/MultipleDatabases: ...@@ -25,7 +25,6 @@ Database/MultipleDatabases:
- lib/gitlab/import_export/group/relation_tree_restorer.rb - lib/gitlab/import_export/group/relation_tree_restorer.rb
- lib/gitlab/legacy_github_import/importer.rb - lib/gitlab/legacy_github_import/importer.rb
- lib/gitlab/seeder.rb - lib/gitlab/seeder.rb
- lib/system_check/orphans/repository_check.rb
- spec/db/schema_spec.rb - spec/db/schema_spec.rb
- spec/initializers/database_config_spec.rb - spec/initializers/database_config_spec.rb
- spec/lib/backup/manager_spec.rb - spec/lib/backup/manager_spec.rb
......
...@@ -57,8 +57,8 @@ module SystemCheck ...@@ -57,8 +57,8 @@ module SystemCheck
WHERE (p.repository_storage LIKE ?) WHERE (p.repository_storage LIKE ?)
" "
query = ActiveRecord::Base.send(:sanitize_sql_array, [sql, storage_name]) # rubocop:disable GitlabSecurity/PublicSend query = ::Project.sanitize_sql_array([sql, storage_name])
ActiveRecord::Base.connection.select_all(query).rows.try(:flatten!) || [] ::Project.connection.select_all(query).rows.try(:flatten!) || []
end end
def fetch_disk_namespaces(storage_path) def fetch_disk_namespaces(storage_path)
......
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