From 5cb4696f17fc35bae0ee5d512190d513040c213b Mon Sep 17 00:00:00 2001 From: Aditya Anand Date: Mon, 3 Jun 2019 23:39:42 +0530 Subject: [PATCH] added alert message if coupon has expired --- app/dashboard/templates/bounty/fund.html | 3 +++ app/dashboard/views.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/app/dashboard/templates/bounty/fund.html b/app/dashboard/templates/bounty/fund.html index b52cc1e8eb1..d06bb0a8fa1 100644 --- a/app/dashboard/templates/bounty/fund.html +++ b/app/dashboard/templates/bounty/fund.html @@ -389,6 +389,9 @@
{% trans "Total"%}
diff --git a/app/dashboard/views.py b/app/dashboard/views.py index 334f1d454cb..c14de17283f 100644 --- a/app/dashboard/views.py +++ b/app/dashboard/views.py @@ -2473,6 +2473,8 @@ def new_bounty(request): if coupon.expiry_date > datetime.now().date(): params['FEE_PERCENTAGE'] = coupon.fee_percentage params['coupon_code'] = coupon.code + else: + params['expired_coupon'] = True print(params['FEE_PERCENTAGE'])