From 1792450978ee3766f6e9f8a8fac8117b134ae42c Mon Sep 17 00:00:00 2001 From: Jasper Maes Date: Wed, 5 Sep 2018 18:12:46 +0200 Subject: Explicit hashed path check for trace, prevents background migration from accessing file_location column that doesn't exist --- app/models/ci/job_artifact.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/models/ci/job_artifact.rb') diff --git a/app/models/ci/job_artifact.rb b/app/models/ci/job_artifact.rb index 4853b23513c..93fc1b145b2 100644 --- a/app/models/ci/job_artifact.rb +++ b/app/models/ci/job_artifact.rb @@ -87,7 +87,9 @@ module Ci end def hashed_path? - super || self.try(:file_location).nil? + return true if trace? # ArchiveLegacyTraces background migration might not have `file_location` column + + super || self.file_location.nil? end def expire_in -- cgit v1.2.1