79218447

Date: 2024-11-23 17:34:00
Score: 1
Natty:
Report link

The possible solution could be

if (itemToRemove != null) {
 cart.getCartItems().remove(itemToRemove); 
 cartRepository.save(cart);
}

because may be your database may not be synchronised,So directly fetching from database then deleting may work.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Girish G