Commit f104252a authored by Jan Provaznik's avatar Jan Provaznik

Merge branch '350651-fix-remaining-code-offenses-using-activerecord-base-methods-2' into 'master'

Fix use of ActiveRecord::Base in RepositoryCheck

See merge request gitlab-org/gitlab!80432
parents c5e61f2a aa8b5e94
...@@ -24,7 +24,6 @@ Database/MultipleDatabases: ...@@ -24,7 +24,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