From f769c3f99cf3366430925680c25e85fc1aa9385b Mon Sep 17 00:00:00 2001 From: titima15 Date: Tue, 12 Nov 2024 16:18:17 -0500 Subject: [PATCH] fixed linting error --- lib/SGN/Controller/AJAX/TrialMetadata.pm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/SGN/Controller/AJAX/TrialMetadata.pm b/lib/SGN/Controller/AJAX/TrialMetadata.pm index 9bd17a496d..af9630f04e 100644 --- a/lib/SGN/Controller/AJAX/TrialMetadata.pm +++ b/lib/SGN/Controller/AJAX/TrialMetadata.pm @@ -5236,10 +5236,20 @@ sub get_trial_plot_order : Path('/ajax/breeders/trial_plot_order') : Args(0) { } + my @all_lines = (); + foreach my $each_line (@data) { + my $each_line_string = join(",", @$each_line); + push @all_lines, $each_line_string; + } + + my $all_lines_string = join("\n", @all_lines); + # Return the generated file $c->res->content_type('text/csv'); $c->res->headers->push_header("Content-disposition", "attachment; filename=\"$filename\""); - $c->res->body( join("\n", map { $_ = join(",", @{$_}) } @data) ); +# $c->res->body( join("\n", map { $_ = join(",", @{$_}) } @data) ); + $c->res->body($all_lines_string); + return; } -- 2.11.4.GIT