Skip to content

Commit

Permalink
TASK: Fix exception in reorderNodeAggregateWasRemoved
Browse files Browse the repository at this point in the history
publish does not work for 0 events
  • Loading branch information
mhsdesign committed Nov 19, 2024
1 parent 0b28b0e commit a5f59c4
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,11 @@ public function reorderNodeAggregateWasRemoved(\Closure $outputFn): void
// get all NodeAggregateWasRemoved from the live content stream
$eventsToReorder = iterator_to_array($this->eventStore->load($liveContentStreamName, EventStreamFilter::create(EventTypes::create(EventType::fromString('NodeAggregateWasRemoved')))), false);

if (!count($eventsToReorder)) {
$outputFn('Migration was not necessary.');
return;
}

// remove all the NodeAggregateWasRemoved events at their sequenceNumbers
$eventTableName = DoctrineEventStoreFactory::databaseTableName($this->contentRepositoryId);
$this->connection->beginTransaction();
Expand Down

0 comments on commit a5f59c4

Please sign in to comment.