Fix loading notes with empty line_code in Project#commit_notes

This commit is contained in:
Riyad Preukschas 2012-11-20 20:26:46 +01:00
parent e8f10f317f
commit 1319373d58

View file

@ -200,7 +200,7 @@ class Project < ActiveRecord::Base
end
def commit_notes(commit)
notes.where(noteable_id: commit.id, noteable_type: "Commit", line_code: nil)
notes.where(noteable_id: commit.id, noteable_type: "Commit").where('line_code IS NULL OR line_code = ""')
end
def commit_line_notes(commit)