mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-24 04:39:59 +08:00
Fixes for saving of result table metadata [SCI-8774]
This commit is contained in:
parent
cd70625a10
commit
c7d992ab83
2 changed files with 2 additions and 1 deletions
|
|
@ -28,7 +28,7 @@
|
|||
fillHandle: false,
|
||||
formulas: true,
|
||||
data: JSON.parse(contents.attr('value')).data,
|
||||
cell: JSON.parse(metadata.val() || '{}').cells || [],
|
||||
cell: (metadata.val() || {}).cells || [],
|
||||
readOnly: true
|
||||
});
|
||||
let hot = $container.handsontable('getInstance');
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ class ResultTablesController < ApplicationController
|
|||
|
||||
def create
|
||||
@table = Table.new(result_params[:table_attributes])
|
||||
@table.metadata = JSON.parse(result_params[:table_attributes][:metadata])
|
||||
@table.created_by = current_user
|
||||
@table.team = current_team
|
||||
@table.last_modified_by = current_user
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue