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
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-29 12:03:20 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-29 12:03:20 +0300
commitc9f18d4587f16eb16b8b902d69576520c08b7f5a (patch)
tree9b4cd5e3a987802cac0061e5a01ade215b3e75c3
parenta9288e554e55e843b95ab6f8109a4c610af64c83 (diff)
Make sure we dont have exception on date parsing
-rw-r--r--lib/gitlab/commits_calendar.rb4
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