From 6db2843bc2e662f785625eb8aff6803c3e2786f8 Mon Sep 17 00:00:00 2001 From: Valery Sizov Date: Thu, 10 Sep 2015 17:54:09 +0300 Subject: fix of project creation --- app/services/ci/create_project_service.rb | 2 +- app/services/ci/register_build_service.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/services/ci') diff --git a/app/services/ci/create_project_service.rb b/app/services/ci/create_project_service.rb index 049ac2e9181..81bbc29bb4f 100644 --- a/app/services/ci/create_project_service.rb +++ b/app/services/ci/create_project_service.rb @@ -13,7 +13,7 @@ module Ci project_url: project_route.gsub(":project_id", @project.id.to_s), } - unless Ci::Network.new.enable_ci(@project.gitlab_id, data, current_user.authenticate_options) + unless Ci::Network.new.enable_ci(@project.gitlab_id, data, {private_token: current_user.private_token}) raise ActiveRecord::Rollback end end diff --git a/app/services/ci/register_build_service.rb b/app/services/ci/register_build_service.rb index 7e0b58a5dc9..33f1c1e918d 100644 --- a/app/services/ci/register_build_service.rb +++ b/app/services/ci/register_build_service.rb @@ -8,7 +8,7 @@ module Ci builds = if current_runner.shared? # don't run projects which have not enables shared runners - builds.includes(:project).where(projects: { shared_runners_enabled: true }) + builds.includes(:project).where(ci_projects: { shared_runners_enabled: true }) else # do run projects which are only assigned to this runner builds.where(project_id: current_runner.projects) -- cgit v1.2.1