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