summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiyad Preukschas <riyad@informatik.uni-bremen.de>2012-11-20 20:26:46 +0100
committerRiyad Preukschas <riyad@informatik.uni-bremen.de>2012-12-03 22:51:56 +0100
commit1319373d58c49eb96c1ec176f3057c2c31750b0e (patch)
treec5b720a8aee5645fabcd664897fd6e2e1825366d
parente8f10f317faca1c87ad6529e3661afa788cb7896 (diff)
downloadgitlab-ce-1319373d58c49eb96c1ec176f3057c2c31750b0e.tar.gz
Fix loading notes with empty line_code in Project#commit_notes
-rw-r--r--app/models/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 74d981f26d6..ac315c49f34 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -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)