From e1123961cfd24866da4b6e7f1b4bd6f7ef546b17 Mon Sep 17 00:00:00 2001 From: Son Date: Wed, 1 Dec 2021 17:41:20 +0100 Subject: [PATCH] check if user has lifetime license on pricing page --- app/dashboard/views/pricing.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/dashboard/views/pricing.py b/app/dashboard/views/pricing.py index 3427066d..a553d1d8 100644 --- a/app/dashboard/views/pricing.py +++ b/app/dashboard/views/pricing.py @@ -24,6 +24,10 @@ from app.models import ( @dashboard_bp.route("/pricing", methods=["GET", "POST"]) @login_required def pricing(): + if current_user.lifetime: + flash("You already have a lifetime subscription", "error") + return redirect(url_for("dashboard.index")) + sub: Subscription = current_user.get_subscription() # user who has canceled can re-subscribe if sub and not sub.cancelled: