Compare commits

...

2 Commits

3 changed files with 10 additions and 3 deletions

3
.changes/v2.10.1.md Normal file
View File

@@ -0,0 +1,3 @@
## v2.10.1 - 2023-10-24
### Fixed
* Fix export controller when generating an export without any data in session

View File

@@ -6,6 +6,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).
## v2.10.1 - 2023-10-24
### Fixed
* Fix export controller when generating an export without any data in session
## v2.10.0 - 2023-10-24
### Feature
* ([#172](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/172)) [export] Add a filter "grouping accompanying period by opening date" and "grouping accompanying period by closing date"

View File

@@ -281,7 +281,7 @@ class ExportController extends AbstractController
$options = match ($step) {
'export', 'generate_export' => [
'export_alias' => $alias,
'picked_centers' => $exportManager->getPickedCenters($data['centers']),
'picked_centers' => $exportManager->getPickedCenters($data['centers'] ?? []),
],
'formatter', 'generate_formatter' => [
'export_alias' => $alias,
@@ -339,9 +339,9 @@ class ExportController extends AbstractController
$exportManager = $this->exportManager;
// 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', [
'step' => $this->getNextStep('export', $export, true),
'alias' => $alias,