Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2018-05-31 14:24:04 +0300
committerYorick Peterse <yorickpeterse@gmail.com>2018-05-31 14:24:04 +0300
commitd148473c972409dc384cc2dbc32eefb707e51d5e (patch)
tree43adcdd2ce41cbfaea1f7bf583449cb31f3fb627 /lib
parent7f32b9d7b58ec9b5668595cc92e86a402db172cd (diff)
parent7b7b249ef40ab3272dda6021e48bd3195b826622 (diff)
Merge branch 'rails5-calendar' into 'master'
Replace .having with .where in calendar query Closes #46964 See merge request gitlab-org/gitlab-ce!19230
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/contributions_calendar.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/contributions_calendar.rb b/lib/gitlab/contributions_calendar.rb
index d7369060cc5..4c28489f45a 100644
--- a/lib/gitlab/contributions_calendar.rb
+++ b/lib/gitlab/contributions_calendar.rb
@@ -85,7 +85,7 @@ module Gitlab
.select(t[:project_id], t[:target_type], t[:action], "date(created_at + #{date_interval}) AS date", 'count(id) as total_amount')
.group(t[:project_id], t[:target_type], t[:action], "date(created_at + #{date_interval})")
.where(conditions)
- .having(t[:project_id].in(Arel::Nodes::SqlLiteral.new(authed_projects.to_sql)))
+ .where("events.project_id in (#{authed_projects.to_sql})") # rubocop:disable GitlabSecurity/SqlInjection
end
end
end