Commit 8b9bbeeb authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Prevent 500 if data[:commits] is nil for event

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 4cb17dee
...@@ -223,7 +223,7 @@ class Event < ActiveRecord::Base ...@@ -223,7 +223,7 @@ class Event < ActiveRecord::Base
# Max 20 commits from push DESC # Max 20 commits from push DESC
def commits def commits
@commits ||= data[:commits].reverse @commits ||= (data[:commits] || []).reverse
end end
def commits_count def commits_count
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment