Commit cacbecd0 authored by James Lopez's avatar James Lopez
Browse files

more changes based on MR feedback

parent d73af27203dd
...@@ -22,7 +22,7 @@ def create ...@@ -22,7 +22,7 @@ def create
Project.transaction do Project.transaction do
@project.import_start @project.import_start
end end
@project.add_import_job if @project.persisted? @project.add_import_job
end end
end end
......
...@@ -103,9 +103,8 @@ def start_import ...@@ -103,9 +103,8 @@ def start_import
def save_project_and_import_data(import_data) def save_project_and_import_data(import_data)
Project.transaction do Project.transaction do
@project.create_or_update_import_data(data: import_data[:data], credentials: import_data[:credentials]) if import_data @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 raise 'Failed to create repository' unless @project.create_repository
end 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