diff options
author | James Lopez <james@jameslopez.es> | 2016-05-10 12:10:51 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-05-10 12:10:51 +0300 |
commit | 1322c981a0aa0752feb16b95e43a1839094a6262 (patch) | |
tree | 036e29148a237f8bd58f8c36f1caab13337f6325 /app/services/projects | |
parent | 3dc64764ad4c004f1b72aa4e80f0095e7a9a6571 (diff) |
create import data in service
Diffstat (limited to 'app/services/projects')
-rw-r--r-- | app/services/projects/create_service.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb index 501e58c1407..a77652480b2 100644 --- a/app/services/projects/create_service.rb +++ b/app/services/projects/create_service.rb @@ -6,6 +6,7 @@ module Projects def execute forked_from_project_id = params.delete(:forked_from_project_id) + import_data = params.delete(:import_data) @project = Project.new(params) @@ -50,6 +51,7 @@ module Projects end 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? |