Check config before deleting it.

This commit is contained in:
Michael Stenta 2023-10-26 09:43:52 -04:00
parent 8c816e835b
commit ac64b7ce27
2 changed files with 6 additions and 2 deletions

View File

@ -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();
}
}

View File

@ -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();
}
}