diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-09-21 12:22:02 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-09-21 12:22:02 +0300 |
commit | c2a7e7b8ac283f19ef324e93380ea1c802c6e7d0 (patch) | |
tree | f52e2189b463423b9cf0a9dbae159df36eed0da5 /lib/api/notes.rb | |
parent | 8799103037873b9009a6cbfe5fd6077202531ef1 (diff) | |
parent | 6df3dd9d5ed6c16d60f560c906dded888d845953 (diff) | |
download | gitlab-ce-c2a7e7b8ac283f19ef324e93380ea1c802c6e7d0.tar.gz |
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
Diffstat (limited to 'lib/api/notes.rb')
-rw-r--r-- | lib/api/notes.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/notes.rb b/lib/api/notes.rb index 8bfa998dc53..c5c214d4d13 100644 --- a/lib/api/notes.rb +++ b/lib/api/notes.rb @@ -83,12 +83,12 @@ module API opts[:created_at] = params[:created_at] end - @note = ::Notes::CreateService.new(user_project, current_user, opts).execute + note = ::Notes::CreateService.new(user_project, current_user, opts).execute - if @note.valid? - present @note, with: Entities::Note + if note.valid? + present note, with: Entities::const_get(note.class.name) else - not_found!("Note #{@note.errors.messages}") + not_found!("Note #{note.errors.messages}") end end |