Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2018-08-03 07:36:43 +0300
committerStan Hu <stanhu@gmail.com>2018-08-03 07:36:43 +0300
commita4351ac077b9f266b4bcfa8f1c4867a837870a27 (patch)
tree74c2f0d6c7aa0a271b91c097c6703d5f0ab69e0a /lib
parentf58122960aa5efbb9420ba4b092de4b5a3de2ae9 (diff)
Add object storage related tests for `gitlab:cleanup:project_uploads` task
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/cleanup/project_uploads.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/cleanup/project_uploads.rb b/lib/gitlab/cleanup/project_uploads.rb
index b88e00311d5..f55ab535efe 100644
--- a/lib/gitlab/cleanup/project_uploads.rb
+++ b/lib/gitlab/cleanup/project_uploads.rb
@@ -40,7 +40,7 @@ module Gitlab
# Accepts a path in the form of "#{hex_secret}/#{filename}"
def find_correct_path(upload_path)
upload = Upload.find_by(uploader: 'FileUploader', path: upload_path)
- return unless upload && upload.local?
+ return unless upload && upload.local? && upload.model
upload.absolute_path
rescue => e