diff options
Diffstat (limited to 'app/services/projects/create_service.rb')
-rw-r--r-- | app/services/projects/create_service.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/services/projects/create_service.rb b/app/services/projects/create_service.rb index 728eb039b54..ef06545b27d 100644 --- a/app/services/projects/create_service.rb +++ b/app/services/projects/create_service.rb @@ -13,7 +13,7 @@ module Projects end def execute - if @params[:template_name].present? + if create_from_template? return ::Projects::CreateFromTemplateService.new(current_user, params).execute end @@ -184,6 +184,10 @@ module Projects private + def create_from_template? + @params[:template_name].present? || @params[:template_project_id].present? + end + def import_schedule if @project.errors.empty? @project.import_state.schedule if @project.import? && !@project.bare_repository_import? |