Fixes for saving of result table metadata [SCI-8774]

This commit is contained in:
Martin Artnik 2023-07-03 12:35:29 +02:00
parent cd70625a10
commit c7d992ab83
2 changed files with 2 additions and 1 deletions

View file

@ -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');

View file

@ -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