From ac64b7ce27216f6f9b354e1f95895823f72fd12f Mon Sep 17 00:00:00 2001 From: Michael Stenta Date: Thu, 26 Oct 2023 09:43:52 -0400 Subject: [PATCH] Check config before deleting it. --- modules/asset/group/farm_group.post_update.php | 4 +++- modules/core/location/farm_location.post_update.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/asset/group/farm_group.post_update.php b/modules/asset/group/farm_group.post_update.php index bf1746aa3..0b701f4fd 100644 --- a/modules/asset/group/farm_group.post_update.php +++ b/modules/asset/group/farm_group.post_update.php @@ -12,5 +12,7 @@ use Drupal\system\Entity\Action; */ function farm_group_post_update_uninstall_asset_group_action(&$sandbox) { $config = Action::load('asset_group_action'); - $config->delete(); + if (!empty($config)) { + $config->delete(); + } } diff --git a/modules/core/location/farm_location.post_update.php b/modules/core/location/farm_location.post_update.php index 9607a797d..7d611a664 100644 --- a/modules/core/location/farm_location.post_update.php +++ b/modules/core/location/farm_location.post_update.php @@ -12,5 +12,7 @@ use Drupal\system\Entity\Action; */ function farm_location_post_update_uninstall_asset_move_action(&$sandbox) { $config = Action::load('asset_move_action'); - $config->delete(); + if (!empty($config)) { + $config->delete(); + } }