Skip to content

Commit

Permalink
!!! TASK: Let UI create nodes without nodeName by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Sep 1, 2023
1 parent ec3ef24 commit c85c241
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/Domain/Model/Changes/AbstractCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c85c241

Please sign in to comment.