Skip to content

Commit

Permalink
Fix bug in CSV exports
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmitchell committed Jan 1, 2023
1 parent 9e60276 commit 935b731
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function view($context, $id)
$csv_columns = [];
$csv_headings = [];
foreach ($model->csv_columns as $list_col) {
$col = $list_col['column'];
$col = is_string($list_col['column']) ? json_decode($list_col['column'], true) : $list_col['column'];
$csv_columns[] = $col['key'];
$csv_headings[] = $list_col['label'];
}
Expand Down Expand Up @@ -210,7 +210,7 @@ public function view($context, $id)
$list_columns = [];
$sort_column = '';
foreach ($model->list_columns as $list_col) {
$col = json_decode($list_col['column'], true);
$col = is_string($list_col['column']) ? json_decode($list_col['column'], true) : $list_col['column'];
$list_columns[$col['key']] = [
'title' => $list_col['label'],
];
Expand Down

0 comments on commit 935b731

Please sign in to comment.