diff options
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/runners.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/api/runners.rb b/lib/api/runners.rb index 2c2610fc2e7..ecc8f2fc5a2 100644 --- a/lib/api/runners.rb +++ b/lib/api/runners.rb @@ -97,7 +97,9 @@ module API runner = get_runner(params[:runner_id]) authenticate_enable_runner!(runner) - if runner.assign_to(user_project) + runner_project = runner.assign_to(user_project) + + if runner_project.persisted? present runner, with: Entities::Runner else conflict!("Runner was already enabled for this project") |