Skip asset if file is missing in protocol export [SCI-2250]

This commit is contained in:
Oleksii Kriuchykhin 2018-03-25 13:36:24 +02:00
parent 2356b78044
commit ecd3c73772

View file

@ -739,6 +739,7 @@ class ProtocolsController < ApplicationController
step_dir = "#{protocol_dir}/#{step_guid}"
if step.assets.exists?
step.assets.order(:id).each do |asset|
next unless asset.file.exists?
asset_guid = get_guid(asset.id)
asset_file_name = asset_guid.to_s +
File.extname(asset.file_file_name).to_s