Commit 4852acef authored by Lin Jen-Shin's avatar Lin Jen-Shin
parent 5d76c255
...@@ -27,8 +27,8 @@ module Ci ...@@ -27,8 +27,8 @@ module Ci
end end
scope :available_for, ->(project) do scope :available_for, ->(project) do
# TODO: That `to_sql` is needed to workaround a weird Rails bug. # FIXME: That `to_sql` is needed to workaround a weird Rails bug.
# Without that, placeholders would miss one and couldn't match. # Without that, placeholders would miss one and couldn't match.
where(locked: false). where(locked: false).
where.not("id IN (#{project.runners.select(:id).to_sql})").specific where.not("id IN (#{project.runners.select(:id).to_sql})").specific
end end
......
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