From ea0121b4f719211afbe2c390c615fd1cf259fd99 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Mon, 14 Mar 2022 15:44:53 +0100 Subject: [PATCH] update node entity constraints --- src/core/Entity/Site/Node.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/Entity/Site/Node.php b/src/core/Entity/Site/Node.php index 0d6c3a7..883c197 100644 --- a/src/core/Entity/Site/Node.php +++ b/src/core/Entity/Site/Node.php @@ -157,12 +157,12 @@ class Node implements EntityInterface protected $analyticReferers; /** - * @ORM\Column(type="array") + * @ORM\Column(type="array", nullable=true) */ private $securityRoles = []; /** - * @ORM\Column(type="string", length=3, options={"default"="or"}) + * @ORM\Column(type="string", length=3, nullable=true) */ private $securityOperator = 'or'; @@ -662,9 +662,9 @@ class Node implements EntityInterface return $this; } - public function getSecurityOperator(): ?string + public function getSecurityOperator(): string { - return $this->securityOperator; + return $this->securityOperator ?? 'or'; } public function setSecurityOperator(string $securityOperator): self