diff --git a/src/Director/BodyTo/BodyToRule.php b/src/Director/BodyTo/BodyToRule.php index eeedb22..4271193 100644 --- a/src/Director/BodyTo/BodyToRule.php +++ b/src/Director/BodyTo/BodyToRule.php @@ -29,7 +29,7 @@ public static function build(array $data): Rule ->setTriggerType($data['trigger_type']) ->setConditionData($data['condition_data']) ->setName($data['name']) - ->setReadonly($data['readonly']) + ->setReadonly($data['readonly'] ?? null) ->setDeletedAt($data['deleted_at'] ? self::date($data, 'deleted_at') : null) ->setCreatedAt(self::date($data, 'created_at')) ->setUpdatedAt($data['updated_at'] ? self::date($data, 'updated_at') : null) diff --git a/src/Entity/RuleInternal.php b/src/Entity/RuleInternal.php index e6a9977..c362a75 100644 --- a/src/Entity/RuleInternal.php +++ b/src/Entity/RuleInternal.php @@ -51,7 +51,7 @@ public function setUpdatedAt(?DateTimeImmutable $updatedAt): self /** * @internal */ - public function setReadonly(bool $readonly): self + public function setReadonly(?bool $readonly): self { $this->readonly = $readonly;