mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 10:14:17 +08:00
Use the same ordering in PDF report for full results file previews as in the main results section [SCI-5742]
This commit is contained in:
parent
32682efd92
commit
8fd876ab84
1 changed files with 2 additions and 1 deletions
|
@ -96,7 +96,8 @@ module Reports
|
||||||
def append_result_asset_previews(report, report_file)
|
def append_result_asset_previews(report, report_file)
|
||||||
Dir.mktmpdir do |tmp_dir|
|
Dir.mktmpdir do |tmp_dir|
|
||||||
report.report_elements.my_module.each do |my_module_element|
|
report.report_elements.my_module.each do |my_module_element|
|
||||||
my_module_element.my_module.results.each do |result|
|
results = my_module_element.my_module.results
|
||||||
|
order_results_for_report(results, report.settings.dig(:task, :result_order)).each do |result|
|
||||||
next unless result.is_asset && PREVIEW_EXTENSIONS.include?(result.asset.file.blob.filename.extension)
|
next unless result.is_asset && PREVIEW_EXTENSIONS.include?(result.asset.file.blob.filename.extension)
|
||||||
|
|
||||||
asset = result.asset
|
asset = result.asset
|
||||||
|
|
Loading…
Reference in a new issue