diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-03-30 20:27:03 +0300 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2018-04-05 14:29:57 +0300 |
commit | c1946364707947f56048cc00caa6d67fe635f3c7 (patch) | |
tree | 107096b44758bf8872bd60d41ed1ab8ab4e86c14 /app/services/notes/post_process_service.rb | |
parent | 166b4575a6353668c894fea0ba234d0b371dee03 (diff) |
Better group support notes-related code
Updates notes-related services and rendering so this code can be
easily used for group-scoped resources (specifically Epics).
Related to gitlab-ee!5205
Diffstat (limited to 'app/services/notes/post_process_service.rb')
-rw-r--r-- | app/services/notes/post_process_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/notes/post_process_service.rb b/app/services/notes/post_process_service.rb index ad3dcc5010b..27ac68c3c82 100644 --- a/app/services/notes/post_process_service.rb +++ b/app/services/notes/post_process_service.rb @@ -11,7 +11,7 @@ module Notes unless @note.system? EventCreateService.new.leave_note(@note, @note.author) - return unless @note.for_project_noteable? + return if @note.for_personal_snippet? @note.create_cross_references! execute_note_hooks @@ -23,6 +23,8 @@ module Notes end def execute_note_hooks + return unless @note.project + note_data = hook_data @note.project.execute_hooks(note_data, :note_hooks) @note.project.execute_services(note_data, :note_hooks) |