Skip to content
Snippets Groups Projects
Commit f739a4e8 authored by Grzegorz Bizon's avatar Grzegorz Bizon Committed by Robert Speicher
Browse files

Remove reduntant note validation from create service

parent 1bcb1ef8
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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)
Loading
Loading
@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment