mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-12 17:31:00 +08:00
Merge pull request #1055 from okriuchykhin/ok_SCI_2250
Skip asset if file is missing in protocol export [SCI-2250]
This commit is contained in:
commit
fc06f8c60b
1 changed files with 1 additions and 0 deletions
|
|
@ -742,6 +742,7 @@ class ProtocolsController < ApplicationController
|
||||||
step_dir = "#{protocol_dir}/#{step_guid}"
|
step_dir = "#{protocol_dir}/#{step_guid}"
|
||||||
if step.assets.exists?
|
if step.assets.exists?
|
||||||
step.assets.order(:id).each do |asset|
|
step.assets.order(:id).each do |asset|
|
||||||
|
next unless asset.file.exists?
|
||||||
asset_guid = get_guid(asset.id)
|
asset_guid = get_guid(asset.id)
|
||||||
asset_file_name = asset_guid.to_s +
|
asset_file_name = asset_guid.to_s +
|
||||||
File.extname(asset.file_file_name).to_s
|
File.extname(asset.file_file_name).to_s
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue