summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-12-03 12:04:16 +0100
committerKamil Trzcinski <ayufan@ayufan.eu>2017-12-03 13:32:37 +0100
commit6b6fb11a235893335bc8d67b86c9328d027b72e0 (patch)
tree9248dfda8c2fc0b99e8403d96fad2481a550ea98
parent02831af9da8f50a824bae223c5f5e6bdc0e0a225 (diff)
downloadgitlab-ce-6b6fb11a235893335bc8d67b86c9328d027b72e0.tar.gz
Code style
-rw-r--r--app/models/ci/build.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index a19273484ef..c41757cf394 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -38,7 +38,8 @@ module Ci
scope :unstarted, ->() { where(runner_id: nil) }
scope :ignore_failures, ->() { where(allow_failure: false) }
scope :with_artifacts, ->() do
- where('(artifacts_file IS NOT NULL AND artifacts_file <> ?) OR EXISTS (?)', '', Ci::JobArtifact.select(1).where('ci_builds.id = ci_job_artifacts.build_id'))
+ where('(artifacts_file IS NOT NULL AND artifacts_file <> ?) OR EXISTS (?)',
+ '', Ci::JobArtifact.select(1).where('ci_builds.id = ci_job_artifacts.job_id'))
end
scope :with_artifacts_not_expired, ->() { with_artifacts.where('artifacts_expire_at IS NULL OR artifacts_expire_at > ?', Time.now) }
scope :with_expired_artifacts, ->() { with_artifacts.where('artifacts_expire_at < ?', Time.now) }