summaryrefslogtreecommitdiff
path: root/app/models/event.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-25 17:59:12 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-11-25 17:59:12 +0200
commit8b9bbeeba28ee077aec04180b7f13c2ed9967051 (patch)
treec38b67a26b9e9980432fa63c884607f13d162b81 /app/models/event.rb
parent4cb17deec171151c0e1acd582861cafced43e89e (diff)
downloadgitlab-ce-8b9bbeeba28ee077aec04180b7f13c2ed9967051.tar.gz
Prevent 500 if data[:commits] is nil for event
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/event.rb')
-rw-r--r--app/models/event.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/event.rb b/app/models/event.rb
index f78f127242d..771c6280567 100644
--- a/app/models/event.rb
+++ b/app/models/event.rb
@@ -223,7 +223,7 @@ class Event < ActiveRecord::Base
# Max 20 commits from push DESC
def commits
- @commits ||= data[:commits].reverse
+ @commits ||= (data[:commits] || []).reverse
end
def commits_count