mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-11 17:36:13 +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 = []
|
asset_ids = []
|
||||||
step_pos = 0
|
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!(
|
step = Step.create!(
|
||||||
name: step_json["name"],
|
name: step_json["name"],
|
||||||
description: step_json["description"],
|
description: step_json["description"],
|
||||||
|
@ -120,6 +122,7 @@ module ProtocolsImporter
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# Post process assets
|
# Post process assets
|
||||||
asset_ids.each do |asset_id|
|
asset_ids.each do |asset_id|
|
||||||
|
|
Loading…
Reference in a new issue