Simplify Procedure#generate_export code
This commit is contained in:
parent
031522cf42
commit
8637a3015e
1 changed files with 1 additions and 1 deletions
|
@ -189,7 +189,7 @@ class Procedure < ApplicationRecord
|
|||
def generate_export
|
||||
exportable_dossiers = dossiers.downloadable_sorted
|
||||
|
||||
headers = exportable_dossiers.any? ? exportable_dossiers.first.export_headers : []
|
||||
headers = exportable_dossiers&.first&.export_headers || []
|
||||
data = exportable_dossiers.any? ? exportable_dossiers.map { |d| d.full_data_strings_array } : [[]]
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue