Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Make gift card utils simpler

fowczarek0fda26c62c7f
diff --git a/saleor/giftcard/utils.py b/saleor/giftcard/utils.py
index c1d8dd8ed6..a87de62b77 100644
--- a/saleor/giftcard/utils.py
+++ b/saleor/giftcard/utils.py
@@ -14,11 +14,6 @@ def add_gift_card_code_to_checkout(checkout: Checkout, promo_code: str):
gift_card = GiftCard.objects.active(date=date.today()).get(code=promo_code)
except GiftCard.DoesNotExist:
raise ValidationError({"promo_code": "Gift card with given code is invalid."})
- add_gift_card_to_checkout(checkout, gift_card)
-
-
-def add_gift_card_to_checkout(checkout: Checkout, gift_card: str):
- """Add gift card data to checkout."""
checkout.gift_cards.add(gift_card)