Skip to content

Commit

Permalink
Empty commandes
Browse files Browse the repository at this point in the history
  • Loading branch information
larousso committed Aug 5, 2024
1 parent 619e9fe commit e29a36c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ public int hashCode() {

@Override
public CompletionStage<InTransactionResult<List<Either<Error, ProcessingSuccess<S, E, Meta, Context, Message>>>>> batchProcessCommand(TxCtx ctx, List<C> commands) {
if (commands.isEmpty()) {
return CompletionStages.completedStage(new InTransactionResult<>(List.empty(), () -> CompletionStages.completedStage(Tuple.empty())));
}
// Collect all states from db
return aggregateStore.getAggregates(ctx, commands.filter(Command::hasId).map(c -> c.entityId().get()))
.thenCompose(states ->
Expand Down

0 comments on commit e29a36c

Please sign in to comment.