diff options
author | James Lopez <james@jameslopez.es> | 2016-05-12 19:27:20 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-05-12 19:27:20 +0300 |
commit | cacbecd05c4edc7d27c458462463f2ee65383ea5 (patch) | |
tree | b0f80557c9c01475e9fa59e4eedc757a37ab05ab /app/services/projects | |
parent | f27d7b2c642e66a45b2b3644e955250786ae07fa (diff) |
more changes based on MR feedback
Diffstat (limited to 'app/services/projects')
-rw-r--r-- | app/services/projects/create_service.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb index e0081e5162f..2687544ae62 100644 --- a/app/services/projects/create_service.rb +++ b/app/services/projects/create_service.rb @@ -103,9 +103,8 @@ module Projects def save_project_and_import_data(import_data) Project.transaction do @project.create_or_update_import_data(data: import_data[:data], credentials: import_data[:credentials]) if import_data - @project.save - if @project.persisted? && !@project.import? + if @project.save && !@project.import? raise 'Failed to create repository' unless @project.create_repository end end |