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
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2018-02-21 19:09:30 +0300
committerSean McGivern <sean@gitlab.com>2018-02-22 17:32:01 +0300
commit028562a049f6b5738731be9bedb2b2d9da1b575d (patch)
tree930f2815d9d004bfcbfa01e4396db8a0e54e2d5e /app/uploaders/gitlab_uploader.rb
parent0922027877ea08b42b171f5ab2c4e35eabf4f734 (diff)
Fix 500 error when loading an invalid upload URL
Diffstat (limited to 'app/uploaders/gitlab_uploader.rb')
-rw-r--r--app/uploaders/gitlab_uploader.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/uploaders/gitlab_uploader.rb b/app/uploaders/gitlab_uploader.rb
index a9e5c028b03..010100f2da1 100644
--- a/app/uploaders/gitlab_uploader.rb
+++ b/app/uploaders/gitlab_uploader.rb
@@ -67,6 +67,10 @@ class GitlabUploader < CarrierWave::Uploader::Base
super || file&.filename
end
+ def model_valid?
+ !!model
+ end
+
private
# Designed to be overridden by child uploaders that have a dynamic path