Skip to content

Commit

Permalink
fix(#734): When prices are completely reset on an existing entity, re…
Browse files Browse the repository at this point in the history
…moval mutation for already dropped price might be generated

The `io.evitadb.api.requestResponse.data.structure.ExistingPricesBuilder` in `buildChangeSet` method, when `removeAllNonModifiedPrices` is set to true doesn't filter the original prices by `Droppable::exists` which leads to creating `RemovePriceMutation` for already removed prices and results in rejecting entity upsert.

(cherry picked from commit 5a3e2e7)
  • Loading branch information
novoj committed Nov 6, 2024
1 parent 8d90003 commit 3e7dfc5
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ public int version() {
}),
originalPrices
.stream()
.filter(Droppable::exists)
.filter(it -> priceMutations.get(it.priceKey()) == null)
.map(it -> new RemovePriceMutation(it.priceKey()))
)
Expand Down

0 comments on commit 3e7dfc5

Please sign in to comment.