Commit f739a4e8 authored by Grzegorz Bizon's avatar Grzegorz Bizon Committed by Robert Speicher

Remove reduntant note validation from create service

parent 1bcb1ef8
......@@ -5,8 +5,6 @@ module Notes
note.author = current_user
note.system = false
return unless valid_project?(note)
if note.save
# Finish the harder work in the background
NewNoteWorker.perform_in(2.seconds, note.id, params)
......@@ -15,14 +13,5 @@ module Notes
note
end
private
def valid_project?(note)
return false unless project
return true if note.for_commit?
note.noteable.try(:project) == project
end
end
end
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