diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-22 14:52:44 -0700 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-03-22 14:52:44 -0700 |
commit | 8494170550063c2d0308963cbd14cb46a292c401 (patch) | |
tree | d09589d8c21d4fd9e602409917e696580b8b0b1d /lib | |
parent | 7d84252e052de03431edf39d1f3eeebad34758be (diff) | |
download | gitlab-ce-8494170550063c2d0308963cbd14cb46a292c401.tar.gz |
Improve contribution calendar per day info
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/contributions_calendar.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/contributions_calendar.rb b/lib/gitlab/contributions_calendar.rb index 79e0a514f9e..3fd0823df06 100644 --- a/lib/gitlab/contributions_calendar.rb +++ b/lib/gitlab/contributions_calendar.rb @@ -14,11 +14,11 @@ module Gitlab date_from = 1.year.ago date_to = Date.today - events = Event.contributions.where(author_id: user.id). + events = Event.reorder(nil).contributions.where(author_id: user.id). where("created_at > ?", date_from).where(project_id: projects). group('date(created_at)'). select('date(created_at), count(id) as total_amount'). - reorder(nil).map(&:attributes) + map(&:attributes) dates = (1.year.ago.to_date..(Date.today + 1.day)).to_a |