diff --git a/app/controllers/api/v1/pull_requests_controller.rb b/app/controllers/api/v1/pull_requests_controller.rb index 7dc35feca..a67ff04a3 100644 --- a/app/controllers/api/v1/pull_requests_controller.rb +++ b/app/controllers/api/v1/pull_requests_controller.rb @@ -49,7 +49,7 @@ class Api::V1::PullRequestsController < Api::V1::BaseController @pull = @project.pull_requests.new @pull.build_issue title: pull_params[:title], body: pull_params[:body] - @pull.from_project = @project + @pull.from_project = from_project @pull.to_ref, @pull.from_ref = pull_params[:to_ref], pull_params[:from_ref] @pull.issue.assignee_id = pull_params[:assignee_id] if can?(:write, @project) @pull.issue.user, @pull.issue.project = current_user, @project