fix error when not in error for edit form
This commit is contained in:
parent
b3d4064841
commit
c08b49fe48
1 changed files with 7 additions and 2 deletions
|
@ -336,13 +336,18 @@ final class AdminController extends AbstractController
|
|||
|
||||
$place = $this->entityManager->getRepository(Place::class)->findOneBy(['osm_kind' => $osm_kind, 'osmId' => $osm_id]);
|
||||
if ($place) {
|
||||
$this->actionLogger->log('ERROR_admin/placeType', ['osm_kind' => $osm_kind, 'osm_id' => $osm_id,
|
||||
$this->actionLogger->log('admin/placeType', ['osm_kind' => $osm_kind, 'osm_id' => $osm_id,
|
||||
'name' => $place->getName(),
|
||||
'code_insee' => $place->getZipCode(),
|
||||
'uuid' => $place->getUuidForUrl()
|
||||
]);
|
||||
return $this->redirectToRoute('app_admin_commerce', ['id' => $place->getId()]);
|
||||
} else {
|
||||
$this->actionLogger->log('ERROR_admin/placeType', ['osm_kind' => $osm_kind, 'osm_id' => $osm_id,
|
||||
'name' => $place->getName(),
|
||||
'code_insee' => $place->getZipCode(),
|
||||
'uuid' => $place->getUuidForUrl()
|
||||
]);
|
||||
$this->addFlash('error', 'Le lieu n\'existe pas.');
|
||||
$this->actionLogger->log('ERROR_admin/placeType', ['osm_kind' => $osm_kind, 'osm_id' => $osm_id]);
|
||||
return $this->redirectToRoute('app_public_index');
|
||||
|
@ -370,7 +375,7 @@ final class AdminController extends AbstractController
|
|||
throw $this->createNotFoundException('Commerce non trouvé');
|
||||
$this->actionLogger->log('ERROR_admin_show_commerce_form_id', ['id' => $id]);
|
||||
}
|
||||
$this->actionLogger->log('ERROR_admin_show_commerce_form_id', [
|
||||
$this->actionLogger->log('admin_show_commerce_form_id', [
|
||||
'id' => $id,
|
||||
'name' => $commerce->getName(),
|
||||
'code_insee' => $commerce->getZipCode(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue