From faadca77b68c3a3492a479e3bf3ab0191ca65bd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Laurent=20L=C3=A9cluse?= <laurent.lecluse@unicaen.fr>
Date: Thu, 19 Nov 2020 11:06:50 +0100
Subject: [PATCH] =?UTF-8?q?Correction=20de=20bug=20:=20leID=20=C3=A9tait?=
 =?UTF-8?q?=20r=C3=A9cup=C3=A9r=C3=A9=20alors=20que=20c'est=20l'entit?=
 =?UTF-8?q?=C3=A9=20dont=20nous=20avons=20besoin?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../src/Application/Controller/ChargensController.php    | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/module/Application/src/Application/Controller/ChargensController.php b/module/Application/src/Application/Controller/ChargensController.php
index a067882cad..c81c6b5f68 100755
--- a/module/Application/src/Application/Controller/ChargensController.php
+++ b/module/Application/src/Application/Controller/ChargensController.php
@@ -43,7 +43,6 @@ class ChargensController extends AbstractController
     use SeuilChargeServiceAwareTrait;
 
 
-
     public function indexAction()
     {
         return [];
@@ -239,7 +238,7 @@ class ChargensController extends AbstractController
         ]);
 
         /** @var Scenario $scenario */
-        $scenario = $this->params()->fromRoute('scenario');
+        $scenario = $scenario = $this->getEvent()->getParam('scenario');
 
         $filtre = $this->getFormChargensScenarioFiltre();
         if ($scenario) $filtre->get('scenario')->setValue($scenario->getId());
@@ -300,7 +299,7 @@ class ChargensController extends AbstractController
     public function seuilCalcHeuresAction()
     {
         /** @var Scenario $scenario */
-        $scenario = $this->params()->fromRoute('scenario');
+        $scenario = $scenario = $this->getEvent()->getParam('scenario');
 
         $provider = $this->getProviderChargens();
         $provider->setScenario($scenario);
@@ -320,7 +319,7 @@ class ChargensController extends AbstractController
         ]);
 
         /** @var Scenario $scenario */
-        $scenario = $this->params()->fromRoute('scenario');
+        $scenario = $scenario = $this->getEvent()->getParam('scenario');
 
         $filtre = $this->getFormChargensScenarioFiltre();
         if ($scenario) $filtre->get('scenario')->setValue($scenario->getId());
@@ -352,7 +351,7 @@ class ChargensController extends AbstractController
     public function exportCsvAction()
     {
         /** @var Scenario $scenario */
-        $scenario = $this->params()->fromRoute('scenario');
+        $scenario = $this->getEvent()->getParam('scenario');
 
         $annee     = $this->getServiceContext()->getAnnee();
         $structure = $this->getServiceContext()->getStructure();
-- 
GitLab