Commit fe86dcfb6617dcdbfe19041b973a946cf93643dd

Authored by Sato Hiroyuki
Committed by Dmitriy Zaporozhets
1 parent 6470cfee

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