Commit 4974f15d authored by Lin Jen-Shin's avatar Lin Jen-Shin

Using `merge_request` in that case would break tests

This is a bad smell that we should fix
parent 7d5eb7d0
......@@ -38,8 +38,8 @@ module EE
# Target the MR target project in priority, else it depends whether the project
# is forked.
target_project = if merge_request
merge_request.target_project
target_project = if @merge_request # rubocop:disable Gitlab/ModuleWithInstanceVariables
@merge_request.target_project # rubocop:disable Gitlab/ModuleWithInstanceVariables
elsif project.forked? && project.id.to_s != mr_params[:target_project_id]
project.forked_from_project
else
......
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