'Reset the items price state in the user cart'

def reset_cart_items_prices(self):

    for item in self.orderitem_set.all():
        if item.is_discounted:
            item.unit_cost = item.list_price
            item.save()
