Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into CIRC-1933
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrVidinieiev committed Dec 22, 2023
2 parents 8ef15f5 + 2ea8d87 commit 0d9d73a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public CompletableFuture<Result<Item>> fetchByBarcode(String barcode) {
return fetchItemByBarcode(barcode, createItemFinder())
.thenComposeAsync(itemResult -> itemResult.after(when(item -> ofAsync(item::isNotFound),
item -> fetchItemByBarcode(barcode, createCirculationItemFinder())
.thenApply(r -> r.mapFailure(failure -> Result.succeeded(item)))
, item -> completedFuture(itemResult))))
.thenComposeAsync(this::fetchItemRelatedRecords);
}
Expand Down Expand Up @@ -276,6 +277,7 @@ private CompletableFuture<Result<Item>> fetchItem(String itemId) {
}

public CompletableFuture<Result<JsonObject>> fetchItemAsJson(String itemId) {

return SingleRecordFetcher.jsonOrNull(itemsClient, "item")
.fetch(itemId)
.thenApply(mapResult(identityMap::add));
Expand Down

0 comments on commit 0d9d73a

Please sign in to comment.