diff options
author | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-09-05 18:12:46 +0200 |
---|---|---|
committer | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-09-05 18:13:41 +0200 |
commit | 1792450978ee3766f6e9f8a8fac8117b134ae42c (patch) | |
tree | 1bc8fda0cf9b960cbb6a0852f1fc77695a752a87 /app/models/ci/job_artifact.rb | |
parent | f6097cbfaa1fae7cceef583bb3dbbd85286c80c2 (diff) | |
download | gitlab-ce-1792450978ee3766f6e9f8a8fac8117b134ae42c.tar.gz |
Explicit hashed path check for trace, prevents background migration from accessing file_location column that doesn't exist
Diffstat (limited to 'app/models/ci/job_artifact.rb')
-rw-r--r-- | app/models/ci/job_artifact.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |