From 75cc04b8fc3b82dfc99e31596c73ba91586af608 Mon Sep 17 00:00:00 2001
From: Misha Lavrenchuk <58946-ReINFaTe@users.noreply.drupalcode.org>
Date: Tue, 27 Jun 2023 23:28:48 +0200
Subject: [PATCH] Issue #3370552 by ReINFaTe: setAddressFieldFromGeojson should
 use admin level code instead of name

---
 src/DumperPluginManager.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/DumperPluginManager.php b/src/DumperPluginManager.php
index 4b1aed3d..2314a315 100644
--- a/src/DumperPluginManager.php
+++ b/src/DumperPluginManager.php
@@ -82,7 +82,7 @@ class DumperPluginManager extends GeocoderPluginManagerBase {
     // Define an administrative_area line1 from adminLevels name, if existing.
     $administrative_area = '';
     if (!empty($geojson_array['properties']['adminLevels'])) {
-      $administrative_area = array_shift($geojson_array['properties']['adminLevels'])['name'];
+      $administrative_area = array_shift($geojson_array['properties']['adminLevels'])['code'];
     }
 
     // Define the address line1, adding a street number to it, if existing.
-- 
GitLab