mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-25 09:13:05 +08:00
Fix docx report generation for step tables with unknown metadata [SCI-8353] (#5330)
This commit is contained in:
parent
9e058af0a3
commit
8eb7d9fa9d
1 changed files with 2 additions and 2 deletions
|
@ -7,8 +7,8 @@ module Reports::Docx::DrawStepTable
|
|||
obj = self
|
||||
@docx.p
|
||||
@docx.table JSON.parse(table.contents_utf_8)['data'], border_size: Constants::REPORT_DOCX_TABLE_BORDER_SIZE do
|
||||
if table.metadata
|
||||
table.metadata['cells'].each do |cell|
|
||||
if table.metadata.present?
|
||||
table.metadata['cells']&.each do |cell|
|
||||
data = cell[1]
|
||||
next unless data.present? && data['row'].present? && data['col'].present? && data['className'].present?
|
||||
|
||||
|
|
Loading…
Reference in a new issue