Commit 8b9bbeeba28ee077aec04180b7f13c2ed9967051

Authored by Dmitriy Zaporozhets
1 parent 4cb17dee

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

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/event.rb
... ... @@ -223,7 +223,7 @@ class Event &lt; ActiveRecord::Base
223 223  
224 224 # Max 20 commits from push DESC
225 225 def commits
226   - @commits ||= data[:commits].reverse
  226 + @commits ||= (data[:commits] || []).reverse
227 227 end
228 228  
229 229 def commits_count
... ...