Browse Source

Revert "Check if action is appropriate for entity before executing"

This reverts commit 87f475d81c.
MNPALS-2.x
Lucas van Schaik 2 years ago committed by Rosie Le Faive
parent
commit
ee451667d4
  1. 5
      src/PresetReaction/PresetReaction.php

5
src/PresetReaction/PresetReaction.php

@ -56,10 +56,7 @@ 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 for the entity. $action->execute([$entity]);
if ($entity->getEntityTypeId() === $action->getType()) {
$action->execute([$entity]);
}
} }
} }

Loading…
Cancel
Save