mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
fix person validation
This commit is contained in:
@@ -20,7 +20,6 @@ use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Core\Role\Role;
|
||||
use function array_filter;
|
||||
use function array_values;
|
||||
|
||||
|
@@ -131,6 +131,8 @@ final class PersonController extends AbstractController
|
||||
->getFlashBag()->add('error', $this->translator
|
||||
->trans('This form contains errors'));
|
||||
} elseif ($form->isSubmitted() && $form->isValid()) {
|
||||
$this->em->flush();
|
||||
|
||||
$this->get('session')->getFlashBag()
|
||||
->add(
|
||||
'success',
|
||||
@@ -138,8 +140,6 @@ final class PersonController extends AbstractController
|
||||
->trans('The person data has been updated')
|
||||
);
|
||||
|
||||
$this->em->flush();
|
||||
|
||||
return $this->redirectToRoute('chill_person_view', [
|
||||
'person_id' => $person->getId(),
|
||||
]);
|
||||
|
Reference in New Issue
Block a user