mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-13 14:46:05 +10:00
Manually build the SQL so that it properly skips Rails.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user