diff options
author | Rémy Coutable <remy@rymai.me> | 2017-06-07 16:39:30 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-06-07 16:39:30 +0000 |
commit | e263e9f54fff78aac7bab86ccbf5ba237ee52a0a (patch) | |
tree | afee055e5a7bb78dd4a9ea5c4a28daab47b64b9a /lib | |
parent | 6d01535e9ae1ef634f8e802414364c943edb4c32 (diff) | |
parent | ed6f6cf2fc627ca9f1b0e8aa1ed6a9f7e6d2d3ab (diff) | |
download | gitlab-ce-e263e9f54fff78aac7bab86ccbf5ba237ee52a0a.tar.gz |
Merge branch 'fix-memoization-in-contributions-calendar' into 'master'
Fix memoization in ContributionsCalendar#activity_dates
See merge request !11973
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/contributions_calendar.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/contributions_calendar.rb b/lib/gitlab/contributions_calendar.rb index 15992b77680..060e013183f 100644 --- a/lib/gitlab/contributions_calendar.rb +++ b/lib/gitlab/contributions_calendar.rb @@ -28,7 +28,7 @@ module Gitlab union = Gitlab::SQL::Union.new([repo_events, issue_events, mr_events, note_events]) events = Event.find_by_sql(union.to_sql).map(&:attributes) - @activity_events = events.each_with_object(Hash.new {|h, k| h[k] = 0 }) do |event, activities| + @activity_dates = events.each_with_object(Hash.new {|h, k| h[k] = 0 }) do |event, activities| activities[event["date"]] += event["total_amount"] end end |