From b2a076525e07e757e7fb59e2be24e476b27df744 Mon Sep 17 00:00:00 2001 From: Yeni Atencio <47239456+yeniatencio@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:12:45 +1100 Subject: [PATCH] fixed hook (#478) * fixed hook * fixed lint * Update tide_core.install --- tide_core.install | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tide_core.install b/tide_core.install index 8444e2355..02e9e4fb4 100644 --- a/tide_core.install +++ b/tide_core.install @@ -106,8 +106,11 @@ function tide_core_update_10003() { foreach ($configs as $config => $type) { $config_read = _tide_read_config($config, $config_location, TRUE); $storage = \Drupal::entityTypeManager()->getStorage($type); - $config_entity = $storage->createFromStorageRecord($config_read); - $config_entity->save(); + $id = substr($config, strrpos($config, '.') + 1); + if ($storage->load($id) == NULL) { + $config_entity = $storage->createFromStorageRecord($config_read); + $config_entity->save(); + } } $form_configs = [