diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-21 18:09:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-21 18:09:11 +0300 |
commit | 97a128c1d1bf45bcc00d5fae037f840eff1ae4e0 (patch) | |
tree | bb599771ab8da98296a8fbd4573b9eaf137ea315 /app/services/concerns | |
parent | 7f521d27811b472c43203ed3d1bde4460a617f89 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/concerns')
-rw-r--r-- | app/services/concerns/issues/resolve_discussions.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/concerns/issues/resolve_discussions.rb b/app/services/concerns/issues/resolve_discussions.rb index f0e9862ca30..5e87f610e4e 100644 --- a/app/services/concerns/issues/resolve_discussions.rb +++ b/app/services/concerns/issues/resolve_discussions.rb @@ -16,7 +16,11 @@ module Issues # rubocop: disable CodeReuse/ActiveRecord def merge_request_to_resolve_discussions_of strong_memoize(:merge_request_to_resolve_discussions_of) do - MergeRequestsFinder.new(current_user, project_id: project.id) + # sometimes this will be a Group, when work item is created at group level. + # Not sure if we will need to handle resolving an MR with an issue at group level? + next unless container.is_a?(Project) + + MergeRequestsFinder.new(current_user, project_id: container.id) .find_by(iid: merge_request_to_resolve_discussions_of_iid) end end |