BigW Consortium Gitlab

Commit 5bd077bd by Lin Jen-Shin

Manually build the SQL so that it properly skips Rails.

parent fc51bf32
......@@ -29,7 +29,8 @@ module Ci
scope :specific_for, ->(project) do
# TODO: 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: project.runners.to_sql).specific
where(locked: false).
where.not("id IN (#{project.runners.select(:id).to_sql})").specific
end
validate :tag_constraints
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment