Browse Source

Revert "Make sure that the action is appropriate: either system or with same entity type"

This reverts commit a409d402aa.
pull/931/head
Lucas van Schaik 2 years ago
parent
commit
233a65d871
  1. 4
      src/PresetReaction/PresetReaction.php

4
src/PresetReaction/PresetReaction.php

@ -56,8 +56,8 @@ class PresetReaction extends ContextReactionPluginBase implements ContainerFacto
$action_ids = $config['actions']; $action_ids = $config['actions'];
foreach ($action_ids as $action_id) { foreach ($action_ids as $action_id) {
$action = $this->actionStorage->load($action_id); $action = $this->actionStorage->load($action_id);
// Make sure that the action is appropriate: either system or with same entity type. // Make sure that the action is appropriate for the entity.
if ($action->getType() === 'system' || $entity->getEntityTypeId() === $action->getType()) { if ($entity->getEntityTypeId() === $action->getType()) {
$action->execute([$entity]); $action->execute([$entity]);
} }
} }

Loading…
Cancel
Save