Skip to content

Commit 465d227

Browse files
Fix action rule/save in Customer Automation Rules UI API (#482)
1 parent f15668c commit 465d227

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ActionTrigger/Action/AbstractAction.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ public static function createActionDefinitionFromEditmode(\stdClass $setting)
4444
$actionDelayMultiplier = isset(self::$actionDelayMultiplier[$setting->options->actionDelayGuiType]) ? self::$actionDelayMultiplier[$setting->options->actionDelayGuiType] : 1;
4545

4646
$action = new \CustomerManagementFrameworkBundle\Model\ActionTrigger\ActionDefinition();
47-
$action->setId($setting->id);
48-
$action->setCreationDate($setting->creationDate);
47+
if (isset($setting->id)) {
48+
$action->setId($setting->id);
49+
}
50+
if (isset($setting->creationDate)) {
51+
$action->setCreationDate($setting->creationDate);
52+
}
4953
$action->setOptions(json_decode(json_encode($setting->options), true));
5054
$action->setImplementationClass($setting->implementationClass);
5155
$action->setActionDelay($setting->options->actionDelayGuiValue * $actionDelayMultiplier);

0 commit comments

Comments
 (0)