mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-13 08:29:22 +08:00
Merge pull request #1343 from okriuchykhin/ok_SCI_2826
Skip missing files in assets [SCI-2826]
This commit is contained in:
commit
802290df8b
1 changed files with 5 additions and 1 deletions
|
@ -166,7 +166,11 @@ class TeamZipExport < ZipExport
|
|||
"_#{i}")}"
|
||||
end
|
||||
file = FileUtils.touch(name).first
|
||||
File.open(file, 'wb') { |f| f.write(asset.open.read) }
|
||||
if asset.file.exists?
|
||||
File.open(file, 'wb') do |f|
|
||||
f.write(Paperclip.io_adapters.for(asset.file).read)
|
||||
end
|
||||
end
|
||||
asset_indexes[asset.id] = name
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue