mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-04 03:36:44 +08:00
Fix projects exports with tables [SCI-8827] (#5840)
This commit is contained in:
parent
f735c917af
commit
9d336423ab
2 changed files with 2 additions and 2 deletions
|
@ -276,7 +276,7 @@ class Project < ApplicationRecord
|
|||
tables = parsed_html.css('.hot-table-contents')
|
||||
.zip(parsed_html.css('.hot-table-container'), parsed_html.css('.hot-table-metadata'))
|
||||
tables.each do |table_input, table_container, metadata|
|
||||
is_plate_template = JSON.parse(metadata['value'])['plateTemplate'] if metadata.present?
|
||||
is_plate_template = JSON.parse(metadata['value'])['plateTemplate'] if metadata && metadata['value'].present?
|
||||
table_vals = JSON.parse(table_input['value'])
|
||||
table_data = table_vals['data']
|
||||
table_headers = table_vals['headers']
|
||||
|
|
|
@ -122,7 +122,7 @@ class Report < ApplicationRecord
|
|||
)
|
||||
end
|
||||
|
||||
report = Report.new
|
||||
report = Report.new(skip_user_assignments: true)
|
||||
report.name = loop do
|
||||
dummy_name = SecureRandom.hex(10)
|
||||
break dummy_name unless Report.exists?(name: dummy_name)
|
||||
|
|
Loading…
Reference in a new issue