mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 06:56:54 +08:00
Merge pull request #158 from okriuchykhin/ok_SCI_314
Fixes issue with import of empty protocol [fixes SCI-314]
This commit is contained in:
commit
5896cdc4bc
1 changed files with 4 additions and 1 deletions
|
@ -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|
|
||||
|
|
Loading…
Reference in a new issue