mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch 'fixes-for-imports' into 'master'
Fix: fix import of address and problematiques See merge request Chill-Projet/chill-bundles!518
This commit is contained in:
commit
b985e1c93e
@ -78,8 +78,8 @@ class PostalCodeFRFromOpenData
|
|||||||
|
|
||||||
private function handleRecord(array $record): void
|
private function handleRecord(array $record): void
|
||||||
{
|
{
|
||||||
if ('' !== trim($record['coordonnees_gps'])) {
|
if ('' !== trim($record['coordonnees_geographiques'] ?? $record['coordonnees_gps'])) {
|
||||||
[$lat, $lon] = array_map(static fn ($el) => (float) trim($el), explode(',', $record['coordonnees_gps']));
|
[$lat, $lon] = array_map(static fn ($el) => (float) trim($el), explode(',', $record['coordonnees_geographiques'] ?? $record['coordonnees_gps']));
|
||||||
} else {
|
} else {
|
||||||
$lat = $lon = 0.0;
|
$lat = $lon = 0.0;
|
||||||
}
|
}
|
||||||
|
@ -287,7 +287,7 @@ final class SocialWorkMetadata implements SocialWorkMetadataInterface
|
|||||||
$return['socialActionChild'] = $previousSocialActionChild;
|
$return['socialActionChild'] = $previousSocialActionChild;
|
||||||
} else {
|
} else {
|
||||||
$return['socialActionChild'] = $child = (new SocialAction())->setTitle(['fr' => $socialActionChildTitle]);
|
$return['socialActionChild'] = $child = (new SocialAction())->setTitle(['fr' => $socialActionChildTitle]);
|
||||||
$parent->addChild($child);
|
$child->setParent($parent);
|
||||||
$child->setIssue($socialIssue)->setOrdering($orderingChild);
|
$child->setIssue($socialIssue)->setOrdering($orderingChild);
|
||||||
$this->entityManager->persist($child);
|
$this->entityManager->persist($child);
|
||||||
}
|
}
|
||||||
@ -332,7 +332,7 @@ final class SocialWorkMetadata implements SocialWorkMetadataInterface
|
|||||||
} elseif (null !== $socialIssueChildTitle) {
|
} elseif (null !== $socialIssueChildTitle) {
|
||||||
$return['socialIssueChild'] = $child = (new SocialIssue())->setTitle(['fr' => $socialIssueChildTitle])
|
$return['socialIssueChild'] = $child = (new SocialIssue())->setTitle(['fr' => $socialIssueChildTitle])
|
||||||
->setOrdering($orderingChild);
|
->setOrdering($orderingChild);
|
||||||
$parent->addChild($child);
|
$child->setParent($parent);
|
||||||
$this->entityManager->persist($child);
|
$this->entityManager->persist($child);
|
||||||
} else {
|
} else {
|
||||||
$return['socialIssueChild'] = null;
|
$return['socialIssueChild'] = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user