mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-28 11:14:24 +08:00
Fixes issue with import of empty protocol [fixes SCI-314]
This commit is contained in:
parent
57563b9a18
commit
9b7360eebf
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