diff options
author | Rémy Coutable <remy@rymai.me> | 2018-09-05 12:09:25 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-09-05 12:09:25 +0000 |
commit | c6d315b4bb06be644c1c8ca47268bed71c679dd6 (patch) | |
tree | 359375920a4555fab1544e54bbafb4fd666a277b | |
parent | 22265e205b31c751e434531e1096ca88cb3d8622 (diff) | |
parent | 0f2dcffb1df78530a7cc919b659533b5068a0206 (diff) | |
download | gitlab-ce-c6d315b4bb06be644c1c8ca47268bed71c679dd6.tar.gz |
Merge branch 'rails5-fix-job-artifact-hashed-path' into 'master'
Rails 5: fix hashed_path? method that looks up file_location that doesn't exist…
See merge request gitlab-org/gitlab-ce!21510
-rw-r--r-- | app/models/ci/job_artifact.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/rails5-fix-job-artifact-hashed-path.yml | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/app/models/ci/job_artifact.rb b/app/models/ci/job_artifact.rb index 32d7cb3424e..4853b23513c 100644 --- a/app/models/ci/job_artifact.rb +++ b/app/models/ci/job_artifact.rb @@ -87,7 +87,7 @@ module Ci end def hashed_path? - super || self.file_location.nil? + super || self.try(:file_location).nil? end def expire_in diff --git a/changelogs/unreleased/rails5-fix-job-artifact-hashed-path.yml b/changelogs/unreleased/rails5-fix-job-artifact-hashed-path.yml new file mode 100644 index 00000000000..a70bfafb1c9 --- /dev/null +++ b/changelogs/unreleased/rails5-fix-job-artifact-hashed-path.yml @@ -0,0 +1,6 @@ +--- +title: 'Rails 5: fix hashed_path? method that looks up file_location that doesn''t + exist when running certain migration specs' +merge_request: 21510 +author: Jasper Maes +type: other |