mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-28 13:06:13 +00:00
Fix export controller when generating an export without any data in session
This commit is contained in:
parent
4bc1de01d6
commit
2c50f484f0
@ -281,7 +281,7 @@ class ExportController extends AbstractController
|
|||||||
$options = match ($step) {
|
$options = match ($step) {
|
||||||
'export', 'generate_export' => [
|
'export', 'generate_export' => [
|
||||||
'export_alias' => $alias,
|
'export_alias' => $alias,
|
||||||
'picked_centers' => $exportManager->getPickedCenters($data['centers']),
|
'picked_centers' => $exportManager->getPickedCenters($data['centers'] ?? []),
|
||||||
],
|
],
|
||||||
'formatter', 'generate_formatter' => [
|
'formatter', 'generate_formatter' => [
|
||||||
'export_alias' => $alias,
|
'export_alias' => $alias,
|
||||||
@ -339,9 +339,9 @@ class ExportController extends AbstractController
|
|||||||
$exportManager = $this->exportManager;
|
$exportManager = $this->exportManager;
|
||||||
|
|
||||||
// check we have data from the previous step (export step)
|
// check we have data from the previous step (export step)
|
||||||
$data = $this->session->get('centers_step', null);
|
$data = $this->session->get('centers_step', []);
|
||||||
|
|
||||||
if (null === $data) {
|
if (null === $data && true === $this->filterStatsByCenters) {
|
||||||
return $this->redirectToRoute('chill_main_export_new', [
|
return $this->redirectToRoute('chill_main_export_new', [
|
||||||
'step' => $this->getNextStep('export', $export, true),
|
'step' => $this->getNextStep('export', $export, true),
|
||||||
'alias' => $alias,
|
'alias' => $alias,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user