From aefdcdd4311bfd3695b591374b49630b97b77f8c Mon Sep 17 00:00:00 2001 From: Sato Hiroyuki Date: Sun, 2 Jun 2013 07:05:48 +0000 Subject: [PATCH] Fix postgres error when displaying network graph. fix #4149 --- app/models/network/graph.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/network/graph.rb b/app/models/network/graph.rb index ffec4712e45..da815a85924 100644 --- a/app/models/network/graph.rb +++ b/app/models/network/graph.rb @@ -25,7 +25,7 @@ module Network def collect_notes h = Hash.new(0) @project.notes.where('noteable_type = ?' ,"Commit").group('notes.commit_id').select('notes.commit_id, count(notes.id) as note_count').each do |item| - h[item["commit_id"]] = item["note_count"] + h[item.commit_id] = item.note_count.to_i end h end