diff options
author | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-09-05 00:13:45 +0200 |
---|---|---|
committer | Jasper Maes <jaspermaes.jm@gmail.com> | 2018-09-05 00:54:07 +0200 |
commit | 0f2dcffb1df78530a7cc919b659533b5068a0206 (patch) | |
tree | 6efc4e7769b8097e5c416ebe9b9a1b485401722d | |
parent | 91003c6ebb764c9cf3fe01a14d6213b26c09dcc8 (diff) | |
download | gitlab-ce-0f2dcffb1df78530a7cc919b659533b5068a0206.tar.gz |
Rails 5: fix hashed_path? method that looks up file_location that doesn't exist when running certain migration specs
-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 |