Skip to content

Commit 5a28db0

Browse files
authored
Merge pull request #79 from Decodeat/feat/77-behavior-based-recommendation
fix:추천 응답 null 제외
2 parents 56ff8c3 + 546e26d commit 5a28db0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/com/DecodEat/domain/products/service/ProductService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ public List<ProductSearchResponseDto.ProductPrevDto> getProductBasedRecommendati
202202
}
203203

204204
List<Product> productList = response.getRecommendations().stream()
205+
.filter(r -> r.getProductId() != null)
205206
.map(r -> productRepository.findById(r.getProductId())
206207
.orElseThrow(() -> new GeneralException(PRODUCT_NOT_EXISTED)))
207208
.toList();

0 commit comments

Comments
 (0)