diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-27 11:20:24 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-04-27 11:20:24 +0300 |
commit | 7ee1d68e0dae07a9dfefd51994c848449d8b6e11 (patch) | |
tree | 628319edfc2fc99f604efd74bd3799eabd9f498a | |
parent | bafcee93b0587c330f425920315f713997129328 (diff) | |
parent | 0cbafa4d65c31feef9e9651c40eca5dc820bc9ed (diff) | |
download | gitlab-ce-7ee1d68e0dae07a9dfefd51994c848449d8b6e11.tar.gz |
Merge pull request #9186 from Senorsen/patch-1
Fix contributions calendar empty problem under mysql
-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 3fd0823df06..45bb904ed7a 100644 --- a/lib/gitlab/contributions_calendar.rb +++ b/lib/gitlab/contributions_calendar.rb @@ -17,7 +17,7 @@ module Gitlab 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'). + select('date(created_at) as date, count(id) as total_amount'). map(&:attributes) dates = (1.year.ago.to_date..(Date.today + 1.day)).to_a |