Skip to content

Commit

Permalink
BUGFIX: Asset that SetNodeProperties is not handled empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Dec 5, 2024
1 parent 2d735b2 commit 455e12f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ private function __construct(
public OriginDimensionSpacePoint $originDimensionSpacePoint,
public PropertyValuesToWrite $propertyValues,
) {
if ($this->propertyValues->isEmpty()) {
throw new \InvalidArgumentException(sprintf('The command "SetNodeProperties" for node %s must contain property values', $this->nodeAggregateId->value), 1733394351);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,9 @@ public function getPropertiesToUnset(): PropertyNames
)
);
}

public function isEmpty(): bool
{
return $this->values === [];
}
}

0 comments on commit 455e12f

Please sign in to comment.