diff options
author | Mark Fletcher <mark@gitlab.com> | 2017-02-15 18:54:18 +0530 |
---|---|---|
committer | Mark Fletcher <mark@gitlab.com> | 2017-02-15 18:56:57 +0530 |
commit | 7a8d0aab61fa5d59a4bde5330948f1adcfbb542c (patch) | |
tree | 93ad521209554a436bbc8cfa00c6128514fe7267 /lib/api/commits.rb | |
parent | 865e3fcc13834a1503b8a6c3f7cc7826bacdcc9f (diff) | |
download | gitlab-ce-7a8d0aab61fa5d59a4bde5330948f1adcfbb542c.tar.gz |
Ensure only commit comments relevant to target project are returned
Diffstat (limited to 'lib/api/commits.rb')
-rw-r--r-- | lib/api/commits.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb index 2fefe760d24..173083d0ade 100644 --- a/lib/api/commits.rb +++ b/lib/api/commits.rb @@ -114,7 +114,7 @@ module API commit = user_project.commit(params[:sha]) not_found! 'Commit' unless commit - notes = Note.where(commit_id: commit.id).order(:created_at) + notes = user_project.notes.where(commit_id: commit.id).order(:created_at) present paginate(notes), with: Entities::CommitNote end |