Commit 121508f8 authored by Stan Hu's avatar Stan Hu

Merge branch '4056-hashed-storage-upload-transfers' into 'master'

Fix project transfer with hashed-storage attachments

Closes gitlab-ee#4056

See merge request gitlab-org/gitlab-ce!15457
parents d63b39c3 9b3b0f02
......@@ -67,7 +67,7 @@ module Projects
Labels::TransferService.new(current_user, @old_group, project).execute
# Move uploads
Gitlab::UploadsTransfer.new.move_project(project.path, @old_namespace.full_path, @new_namespace.full_path)
move_project_uploads(project)
# Move pages
Gitlab::PagesTransfer.new.move_project(project.path, @old_namespace.full_path, @new_namespace.full_path)
......@@ -139,5 +139,15 @@ module Projects
# Move wiki repo also if present
move_repo_folder("#{@old_path}.wiki", "#{@new_path}.wiki")
end
def move_project_uploads(project)
return if project.hashed_storage?(:attachments)
Gitlab::UploadsTransfer.new.move_project(
project.path,
@old_namespace.full_path,
@new_namespace.full_path
)
end
end
end
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