diff options
author | James Lopez <james@jameslopez.es> | 2018-01-03 16:17:16 +0100 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-01-03 16:17:16 +0100 |
commit | 86257cf7138a6d28c055071219142722787b6546 (patch) | |
tree | 2df6181c6b496617a8d6e7b8a38e24014bfa61f2 /app/services/projects/create_service.rb | |
parent | 80112ca4ec0104c06e939a546b92c7bdb230c01f (diff) | |
download | gitlab-ce-86257cf7138a6d28c055071219142722787b6546.tar.gz |
refactor project create service41424-gitlab-rake-gitlab-import-repos-schedules-an-import
Diffstat (limited to 'app/services/projects/create_service.rb')
-rw-r--r-- | app/services/projects/create_service.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb index 52b90cdf135..dc7b1f1f5cc 100644 --- a/app/services/projects/create_service.rb +++ b/app/services/projects/create_service.rb @@ -120,7 +120,7 @@ module Projects Project.transaction do @project.create_or_update_import_data(data: import_data[:data], credentials: import_data[:credentials]) if import_data - if @project.save && !@project.import? && !@project.bare_repository_import? + if @project.save && !@project.import? raise 'Failed to create repository' unless @project.create_repository end end @@ -165,7 +165,7 @@ module Projects def import_schedule if @project.errors.empty? - @project.import_schedule if @project.import? + @project.import_schedule if @project.import? && !@project.bare_repository_import? else fail(error: @project.errors.full_messages.join(', ')) end |