diff options
author | Patrick Derichs <pderichs@gitlab.com> | 2019-06-19 11:07:17 +0200 |
---|---|---|
committer | Patrick Derichs <pderichs@gitlab.com> | 2019-06-19 11:07:17 +0200 |
commit | 5469d21d02d2969f7b1c629ebd5e5696c664736c (patch) | |
tree | b9a2af1ee11438b6f2ba94b2985a01a980d61100 /lib/api/helpers/notes_helpers.rb | |
parent | 9079085fe7b03a330a50ddee638990af42b22bda (diff) | |
download | gitlab-ce-5469d21d02d2969f7b1c629ebd5e5696c664736c.tar.gz |
Simplify result of find_noteablepderichs-52123
Diffstat (limited to 'lib/api/helpers/notes_helpers.rb')
-rw-r--r-- | lib/api/helpers/notes_helpers.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/api/helpers/notes_helpers.rb b/lib/api/helpers/notes_helpers.rb index c444766249d..b03ac7deb71 100644 --- a/lib/api/helpers/notes_helpers.rb +++ b/lib/api/helpers/notes_helpers.rb @@ -78,9 +78,7 @@ module API noteable = NotesFinder.new(user_project, current_user, params).target noteable = nil unless can?(current_user, noteable_read_ability_name(noteable), noteable) - return not_found!(noteable_type) unless noteable - - noteable + noteable || not_found!(noteable_type) end def params_by_noteable_type_and_id(type, id) |