diff options
Diffstat (limited to 'app/models/ci/runner.rb')
-rw-r--r-- | app/models/ci/runner.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb index 9cf6164e8dd..a120112e882 100644 --- a/app/models/ci/runner.rb +++ b/app/models/ci/runner.rb @@ -23,15 +23,15 @@ module Ci scope :ordered, ->() { order(id: :desc) } scope :owned_or_shared, ->(project_id) do - joins('LEFT JOIN ci_runner_projects ON ci_runner_projects.runner_id = ci_runners.id') - .where("ci_runner_projects.gl_project_id = :project_id OR ci_runners.is_shared = true", project_id: project_id) + joins('LEFT JOIN ci_runner_projects ON ci_runner_projects.runner_id = ci_runners.id'). + where("ci_runner_projects.gl_project_id = :project_id OR ci_runners.is_shared = true", project_id: project_id) end scope :assignable_for, ->(project) do # FIXME: That `to_sql` is needed to workaround a weird Rails bug. # Without that, placeholders would miss one and couldn't match. - where(locked: false) - .where.not("id IN (#{project.runners.select(:id).to_sql})").specific + where(locked: false). + where.not("id IN (#{project.runners.select(:id).to_sql})").specific end validate :tag_constraints |