diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-29 12:03:20 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-01-29 12:03:20 +0300 |
commit | c9f18d4587f16eb16b8b902d69576520c08b7f5a (patch) | |
tree | 9b4cd5e3a987802cac0061e5a01ade215b3e75c3 | |
parent | a9288e554e55e843b95ab6f8109a4c610af64c83 (diff) |
Make sure we dont have exception on date parsing
-rw-r--r-- | lib/gitlab/commits_calendar.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/commits_calendar.rb b/lib/gitlab/commits_calendar.rb index b6699c585f6..ccc80d080af 100644 --- a/lib/gitlab/commits_calendar.rb +++ b/lib/gitlab/commits_calendar.rb @@ -17,8 +17,8 @@ module Gitlab date_timestamps ||= [] date_timestamps.each do |date, commits| - timestamp = Date.parse(date).to_time.to_i.to_s - @timestamps[timestamp] = commits + timestamp = Date.parse(date).to_time.to_i.to_s rescue nil + @timestamps[timestamp] = commits if timestamp end end end |