Commit 5469d21d authored by Patrick Derichs's avatar Patrick Derichs

Simplify result of find_noteable

parent 9079085f
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment