Merge pull request #158 from okriuchykhin/ok_SCI_314

Fixes issue with import of empty protocol [fixes SCI-314]
This commit is contained in:
okriuchykhin 2016-09-23 10:37:35 +02:00 committed by GitHub
commit 5896cdc4bc

View file

@ -48,7 +48,9 @@ module ProtocolsImporter
asset_ids = []
step_pos = 0
protocol_json["steps"].values.each do |step_json|
# Check if protocol has steps
if protocol_json['steps']
protocol_json['steps'].values.each do |step_json|
step = Step.create!(
name: step_json["name"],
description: step_json["description"],
@ -120,6 +122,7 @@ module ProtocolsImporter
end
end
end
end
# Post process assets
asset_ids.each do |asset_id|