Commit c0d7b5bb70260aee0f26c67872559eb1482f2f53

Authored by Dmitriy Zaporozhets
2 parents f82851ca aefdcdd4

Merge pull request #4164 from hiroponz/fix-postgres-error

Fix postgres error when displaying network graph.
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