Commit aefdcdd4311bfd3695b591374b49630b97b77f8c

Authored by Sato Hiroyuki
1 parent ee2124b7

Fix postgres error when displaying network graph.

fix #4149
Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/network/graph.rb
@@ -25,7 +25,7 @@ module Network @@ -25,7 +25,7 @@ module Network
25 def collect_notes 25 def collect_notes
26 h = Hash.new(0) 26 h = Hash.new(0)
27 @project.notes.where('noteable_type = ?' ,"Commit").group('notes.commit_id').select('notes.commit_id, count(notes.id) as note_count').each do |item| 27 @project.notes.where('noteable_type = ?' ,"Commit").group('notes.commit_id').select('notes.commit_id, count(notes.id) as note_count').each do |item|
28 - h[item["commit_id"]] = item["note_count"] 28 + h[item.commit_id] = item.note_count.to_i
29 end 29 end
30 h 30 h
31 end 31 end