mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-11 01:44:34 +08:00
Fixed main issue, bad step structure now gets fixed to empty template
This commit is contained in:
parent
95501eb046
commit
c963c948a1
2 changed files with 11 additions and 13 deletions
|
@ -641,7 +641,6 @@ class ProtocolsController < ApplicationController
|
|||
end
|
||||
@json_object = JSON.parse(json_file_contents)
|
||||
@json_object['steps'] = step_hash_not_null(@json_object['steps'])
|
||||
byebug
|
||||
@json_object['steps'] = protocols_io_guid_reorder_step_json(
|
||||
@json_object['steps']
|
||||
)
|
||||
|
@ -674,7 +673,6 @@ class ProtocolsController < ApplicationController
|
|||
)
|
||||
@db_json['steps'] = {}
|
||||
@json_object['steps'] = step_hash_not_null(@json_object['steps'])
|
||||
byebug
|
||||
@db_json['steps'] = protocols_io_fill_step(
|
||||
@json_object, @db_json['steps']
|
||||
)
|
||||
|
|
|
@ -177,21 +177,21 @@ module ProtocolsIoHelper
|
|||
def generate_null_step_skeleton
|
||||
json_string = [
|
||||
{
|
||||
"guid": 0,
|
||||
"previous_guid": nil,
|
||||
"components":
|
||||
'guid' => '0',
|
||||
'previous_guid' => nil,
|
||||
'components' =>
|
||||
[
|
||||
{
|
||||
"component_type_id": '1',
|
||||
"name": 'Description',
|
||||
"data": '',
|
||||
"data_id": nil
|
||||
'component_type_id' => '1',
|
||||
'name' => 'Description',
|
||||
'data' => '',
|
||||
'data_id' => nil
|
||||
},
|
||||
{
|
||||
"component_type_id": '6',
|
||||
"name": 'Section',
|
||||
"data": 'Step',
|
||||
"data_id": '0'
|
||||
'component_type_id' => '6',
|
||||
'name' => 'Section',
|
||||
'data' => 'Step',
|
||||
'data_id' => '0'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue