From ff17a7e367c5d346fcd7357c96a037f26a096811 Mon Sep 17 00:00:00 2001 From: Jure Grabnar Date: Mon, 14 Jan 2019 16:49:08 +0100 Subject: [PATCH] Fix S3_BUCKET not being defined --- app/services/team_exporter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/team_exporter.rb b/app/services/team_exporter.rb index 54ee46985..b27020b4f 100644 --- a/app/services/team_exporter.rb +++ b/app/services/team_exporter.rb @@ -48,7 +48,7 @@ class TeamExporter end yield if block_given? dir = FileUtils.mkdir_p(File.join(dir_name, a.id.to_s)).first - if ENV['S3_BUCKET'] + if defined?(S3_BUCKET) s3_asset = S3_BUCKET.object(a.public_send(attachment_name).path.remove(%r{^/})) file_name = a.public_send(attachment_name).original_filename