Commit 410bd225 authored by Laurent Lécluse's avatar Laurent Lécluse
Browse files

on n'utilise plus form->delete

parent 1368b2c1
......@@ -225,8 +225,12 @@ class ChargensController extends AbstractController
/** @var Scenario $scenario */
$scenario = $this->getEvent()->getParam('scenario');
$form = $this->getFormChargensScenario();
$form->delete($scenario, $this->getServiceScenario(), "Scénario supprimé avec succès.");
try {
$this->getServiceScenario()->delete($scenario);
$this->flashMessenger()->addSuccessMessage("Scénario supprimé avec succès.");
} catch (\Exception $e) {
$this->flashMessenger()->addErrorMessage($e->getMessage());
}
return new MessengerViewModel();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment