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:
okriuchykhin 2018-03-26 14:19:49 +02:00 committed by GitHub
commit fc06f8c60b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -742,6 +742,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