diff options
-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) |