def untaxed_discount_saved(product, discount):
    """Returns the amount saved by the discount"""

    if discount and discount.valid_for_product(product):
        price = product.unit_price
        discounted = untaxed_discount_price(product, discount)
        saved = discounted - price
        cents = Decimal("0.01")
        return saved.quantize(cents)
    else:
        return Decimal('0.00')
dataset/ETHPy150Open dokterbob/satchmo/satchmo/apps/product/templatetags/satchmo_discounts.py/untaxed_discount_saved/swapped operands of `-`