diff options
author | Douwe Maan <douwe@gitlab.com> | 2019-01-08 02:15:53 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2019-01-08 02:15:53 +0300 |
commit | cfa7108210490704a8110ee97a26de9ae4d9adaf (patch) | |
tree | 4c66dc55df99405b8aba8ed9fa0e3d1fd34eb30e /lib/gitlab | |
parent | 420fb032fc9760395c96bafd3f6600950c2125f4 (diff) | |
parent | f54290de751e365be0928c66bb75fd106bb7aa88 (diff) |
Merge branch '49231-import-issues-csv' into 'master'
Import issues from CSV
Closes #49231
See merge request gitlab-org/gitlab-ce!23532
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/email/attachment_uploader.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/import_export/uploads_manager.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/email/attachment_uploader.rb b/lib/gitlab/email/attachment_uploader.rb index a826519b2dd..3323ce60158 100644 --- a/lib/gitlab/email/attachment_uploader.rb +++ b/lib/gitlab/email/attachment_uploader.rb @@ -23,8 +23,8 @@ module Gitlab content_type: attachment.content_type } - link = UploadService.new(project, file).execute - attachments << link if link + uploader = UploadService.new(project, file).execute + attachments << uploader.to_h if uploader ensure tmp.close! end diff --git a/lib/gitlab/import_export/uploads_manager.rb b/lib/gitlab/import_export/uploads_manager.rb index 474e9d45566..e232198150a 100644 --- a/lib/gitlab/import_export/uploads_manager.rb +++ b/lib/gitlab/import_export/uploads_manager.rb @@ -40,7 +40,7 @@ module Gitlab def add_upload(upload) uploader_context = FileUploader.extract_dynamic_path(upload).named_captures.symbolize_keys - UploadService.new(@project, File.open(upload, 'r'), FileUploader, uploader_context).execute + UploadService.new(@project, File.open(upload, 'r'), FileUploader, uploader_context).execute.to_h end def copy_project_uploads |