diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-01 03:10:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-01 03:10:57 +0300 |
commit | 533fed8bd825f93b4b43bd41d41caa38cfc6ae55 (patch) | |
tree | bdc5458e4fb19126f705b0786c055d1b9c118748 /app/services/resource_events | |
parent | 24fb09b2eb3f4703b09eef3c9bbf842cd055626a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/resource_events')
-rw-r--r-- | app/services/resource_events/base_synthetic_notes_builder_service.rb | 5 | ||||
-rw-r--r-- | app/services/resource_events/merge_into_notes_service.rb | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/app/services/resource_events/base_synthetic_notes_builder_service.rb b/app/services/resource_events/base_synthetic_notes_builder_service.rb index e675bb61072..9943fd4910b 100644 --- a/app/services/resource_events/base_synthetic_notes_builder_service.rb +++ b/app/services/resource_events/base_synthetic_notes_builder_service.rb @@ -44,10 +44,9 @@ module ResourceEvents end def resource_parent - strong_memoize(:resource_parent) do - resource.project || resource.group - end + resource.try(:resource_parent) || resource.project || resource.group end + strong_memoize_attr :resource_parent def table_name raise NotImplementedError diff --git a/app/services/resource_events/merge_into_notes_service.rb b/app/services/resource_events/merge_into_notes_service.rb index ea465c1e75e..eb0023937b2 100644 --- a/app/services/resource_events/merge_into_notes_service.rb +++ b/app/services/resource_events/merge_into_notes_service.rb @@ -37,4 +37,4 @@ module ResourceEvents end end -ResourceEvents::MergeIntoNotesService.prepend_mod_with('ResourceEvents::MergeIntoNotesService') +ResourceEvents::MergeIntoNotesService.prepend_mod |