From fab1c4a81b7eef247abe6bdd3775cf0ce42badc1 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Fri, 10 Jun 2016 14:40:25 +0200 Subject: Show the artifacts expiration prompt in Build Artifacts widget --- app/models/ci/build.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/ci/build.rb') diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 9f66ae63a55..80702b274dd 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -319,7 +319,7 @@ module Ci end def artifacts? - artifacts_file.exists? + !artifacts_expired? && artifacts_file.exists? end def artifacts_metadata? @@ -352,7 +352,7 @@ module Ci end def artifacts_expired? - !artifacts? && artifacts_expire_at && artifacts_expire_at < Time.now + artifacts_expire_at && artifacts_expire_at < Time.now end def artifacts_expire_in -- cgit v1.2.1