diff --git a/app/models/network/graph.rb b/app/models/network/graph.rb
index ffec4712e457714f7758b73bec3b97dc69849b2b..da815a859242c94f325e36efd282a4f2ab7da212 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