diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-08-02 15:09:49 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2018-08-02 15:09:49 +0300 |
commit | 6e03a0f75cf242f7c0f13b5285dde0220b34cd82 (patch) | |
tree | 64cd05c74e91174f5aedc5970f288e0e35c64683 /app/services/projects | |
parent | eed31ddcef3ad469838df3281dbefdaff2be5b53 (diff) |
Update query simplification
Rails 5 didn't like the arel usage, see:
https://gitlab.com/gitlab-org/gitlab-ce/issues/49873#note_92040225
This change makes that right, but also makes the query nicer. I'm not
sure anymore why it didn't work before, however there were issues with
it that have been resolved.
Diffstat (limited to 'app/services/projects')
-rw-r--r-- | app/services/projects/detect_repository_languages_service.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/services/projects/detect_repository_languages_service.rb b/app/services/projects/detect_repository_languages_service.rb index 6669830ac8c..4b4108de231 100644 --- a/app/services/projects/detect_repository_languages_service.rb +++ b/app/services/projects/detect_repository_languages_service.rb @@ -13,10 +13,9 @@ module Projects detection.updates.each do |update| RepositoryLanguage - .arel_table.update_manager .where(project_id: project.id) .where(programming_language_id: update[:programming_language_id]) - .set(share: update[:share]) + .update_all(share: update[:share]) end Gitlab::Database.bulk_insert( |