Merge pull request #3503 from betagouv/fix-sentry-238

Fix Sentry 238
This commit is contained in:
Mathieu Magnin 2019-02-26 15:27:43 +01:00 committed by GitHub
commit d72cc7db0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,9 +28,9 @@ class ProcedureLogoUploader < BaseUploader
if file.present?
if original_filename.present? || model.logo_secure_token
if Flipflop.remote_storage?
filename = "#{model.class.to_s.underscore}-#{secure_token}.#{file.extension.downcase}"
filename = "#{model.class.to_s.underscore}-#{secure_token}.#{file.extension&.downcase}"
else
filename = "logo-#{secure_token}.#{file.extension.downcase}"
filename = "logo-#{secure_token}.#{file.extension&.downcase}"
end
end
filename