diff options
| author | Douwe Maan <douwe@gitlab.com> | 2015-07-02 14:31:25 +0200 |
|---|---|---|
| committer | Robert Speicher <rspeicher@gmail.com> | 2015-07-11 16:47:33 -0400 |
| commit | b93053695a94822801a87ff2b1850999130842c1 (patch) | |
| tree | f0dce4af945bf2c8cdfbb86bb34df92171a01ea2 /app/controllers/projects_controller.rb | |
| parent | f94587eccbeda3bd0092588a12ddf9a586b29dce (diff) | |
| download | gitlab-ce-b93053695a94822801a87ff2b1850999130842c1.tar.gz | |
Fix transferring of project to another group using the API.
Diffstat (limited to 'app/controllers/projects_controller.rb')
| -rw-r--r-- | app/controllers/projects_controller.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 5474f9e97a6..b191819a117 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -52,10 +52,11 @@ class ProjectsController < ApplicationController end def transfer - transfer_params = params.permit(:new_namespace_id) - ::Projects::TransferService.new(project, current_user, transfer_params).execute - if @project.errors[:namespace_id].present? - flash[:alert] = @project.errors[:namespace_id].first + namespace = Namespace.find_by(id: params[:new_namespace_id]) + ::Projects::TransferService.new(project, current_user).execute(namespace) + + if @project.errors[:new_namespace].present? + flash[:alert] = @project.errors[:new_namespace].first end end |
