diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-06-05 23:40:53 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-06-05 23:40:53 +0000 |
commit | 94644565971c80c9933ab3d05c534b3b5cbec4d1 (patch) | |
tree | 32d34ca617871e83c5d75d036bc320b25dae0edf /app/services | |
parent | 38b3064c25bcf0aff900969d5cddbc3bde1b106a (diff) | |
parent | 810866ecb6c7be4fdac88dc3b2a6cd9ad49ac7bf (diff) | |
download | gitlab-ce-94644565971c80c9933ab3d05c534b3b5cbec4d1.tar.gz |
Merge branch 'pull-mirror-overhaul-ce-backport' into 'master'
backports changed import logic from pull mirroring feature into CE
See merge request !11850
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/projects/create_service.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb index 535d93385e6..e874a2d8789 100644 --- a/app/services/projects/create_service.rb +++ b/app/services/projects/create_service.rb @@ -48,15 +48,14 @@ module Projects save_project_and_import_data(import_data) - @project.import_start if @project.import? - after_create_actions if @project.persisted? if @project.errors.empty? - @project.add_import_job if @project.import? + @project.import_schedule if @project.import? else fail(error: @project.errors.full_messages.join(', ')) end + @project rescue ActiveRecord::RecordInvalid => e message = "Unable to save #{e.record.type}: #{e.record.errors.full_messages.join(", ")} " |