Simplify result of find_noteable

This commit is contained in:
Patrick Derichs 2019-06-19 11:07:17 +02:00
parent 9079085fe7
commit 5469d21d02
1 changed files with 1 additions and 3 deletions

View File

@ -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)