up labourage nouvelle ville
This commit is contained in:
parent
cc6c991090
commit
c0a1780fce
4 changed files with 44 additions and 31 deletions
|
|
@ -458,11 +458,13 @@ class PublicController extends AbstractController
|
|||
|
||||
$stats = $place->getStats();
|
||||
if (!$stats) {
|
||||
$stats = $this->entityManager->getRepository(Stats::class)->findOneBy(['zone' => $place->getZipCode()]);
|
||||
}
|
||||
if (!$stats) {
|
||||
$stats = new Stats();
|
||||
$stats->setZone($place->getZipCode());
|
||||
$stats_exist = $this->entityManager->getRepository(Stats::class)->findOneBy(['zone' => $place->getZipCode()]);
|
||||
if ($stats_exist) {
|
||||
$stats = $stats_exist;
|
||||
} else {
|
||||
$stats = new Stats();
|
||||
$stats->setZone($place->getZipCode());
|
||||
}
|
||||
}
|
||||
|
||||
$stats->addPlace($place);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue