Prevent 500 if data[:commits] is nil for event
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
4cb17deec1
commit
8b9bbeeba2
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue