Skip to content

Commit 8ce8560

Browse files
author
Robert Raboud
committed
parse issue
1 parent 4072c0c commit 8ce8560

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/Services/Basket/Basket.API/IntegrationEvents/EventHandling/ProductPriceChangedIntegrationEventHandler.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ public async Task Handle(ProductPriceChangedIntegrationEvent @event)
3030

3131
private async Task UpdatePriceInBasketItems(int productId, decimal newPrice, decimal oldPrice, CustomerBasket basket)
3232
{
33-
var itemsToUpdate = basket?.Items?.Where(x => int.Parse(x.ProductId) == productId).ToList();
33+
string match = productId.ToString();
34+
var itemsToUpdate = basket?.Items?.Where(x => x.ProductId == match).ToList();
3435

35-
if (itemsToUpdate != null)
36+
if (itemsToUpdate != null)
3637
{
3738
foreach (var item in itemsToUpdate)
3839
{

0 commit comments

Comments
 (0)