From c85c2412c7e0a299368ca93ed4cc404e3bde2188 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Fri, 1 Sep 2023 22:32:31 +0200 Subject: [PATCH] !!! TASK: Let UI create nodes without nodeName by default --- Classes/Domain/Model/Changes/AbstractCreate.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Domain/Model/Changes/AbstractCreate.php b/Classes/Domain/Model/Changes/AbstractCreate.php index a8aa6a5bcb..fe949a2715 100644 --- a/Classes/Domain/Model/Changes/AbstractCreate.php +++ b/Classes/Domain/Model/Changes/AbstractCreate.php @@ -97,9 +97,9 @@ protected function createNode( if (is_null($nodeTypeName)) { throw new \RuntimeException('Cannot run createNode without a set node type.', 1645577794); } - // TODO: the $name=... line should be as expressed below - // $name = $this->getName() ?: $this->nodeService->generateUniqueNodeName($parent->findParentNode()); - $nodeName = NodeName::fromString($this->getName() ?: uniqid('node-', false)); + $nodeName = $this->getName() + ? NodeName::fromString($this->getName()) + : null; $nodeAggregateId = NodeAggregateId::create(); // generate a new NodeAggregateId