From: Tim Otten Date: Fri, 7 May 2021 01:52:29 +0000 (-1000) Subject: ManagedEntities - Only set `is_active` if entity supports it X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3cf02556d4d3c257b2605de6cb7696050d39256e;p=civicrm-core.git ManagedEntities - Only set `is_active` if entity supports it --- diff --git a/CRM/Core/ManagedEntities.php b/CRM/Core/ManagedEntities.php index 4668273b50..4c70ce10e8 100644 --- a/CRM/Core/ManagedEntities.php +++ b/CRM/Core/ManagedEntities.php @@ -264,7 +264,10 @@ class CRM_Core_ManagedEntities { $doUpdate = ($policy == 'always'); if ($doUpdate) { - $defaults = ['id' => $dao->entity_id, 'is_active' => 1]; + $defaults = ['id' => $dao->entity_id]; + if ($this->isActivationSupported($dao->entity_type)) { + $defaults['is_active'] = 1; + } $params = array_merge($defaults, $todo['params']); $manager = CRM_Extension_System::singleton()->getManager();