Fix N+1 query in loading pipelines in merge requests

From Bullet failures in !10263
This commit is contained in:
Stan Hu 2017-03-31 22:12:34 -07:00
parent 9fc17f6f4a
commit 66f91aac70
1 changed files with 1 additions and 1 deletions

View File

@ -210,7 +210,7 @@ module Ci
end
def stuck?
builds.pending.any?(&:stuck?)
builds.pending.includes(:project).any?(&:stuck?)
end
def retryable?