mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 06:35:56 +08:00
Merge pull request #7857 from rekonder/aj_SCI_11037
Fix failed docx generation when you can not find image [SCI-11037]
This commit is contained in:
commit
47b3a256fa
|
@ -92,7 +92,19 @@ module Reports
|
|||
end
|
||||
|
||||
if elem.name == 'img'
|
||||
elements.push(img_element(elem))
|
||||
begin
|
||||
elements.push(img_element(elem))
|
||||
rescue StandardError => e
|
||||
Rails.logger.error e.message
|
||||
Rails.logger.error(e.backtrace.join("\n"))
|
||||
|
||||
elements.push(
|
||||
type: 'text',
|
||||
value: I18n.t('projects.reports.index.generation.file_preview_generation_error'),
|
||||
style: { italic: true }
|
||||
)
|
||||
end
|
||||
|
||||
next
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue