check if user has lifetime license on pricing page
This commit is contained in:
parent
57ec92ed7c
commit
e1123961cf
|
@ -24,6 +24,10 @@ from app.models import (
|
||||||
@dashboard_bp.route("/pricing", methods=["GET", "POST"])
|
@dashboard_bp.route("/pricing", methods=["GET", "POST"])
|
||||||
@login_required
|
@login_required
|
||||||
def pricing():
|
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()
|
sub: Subscription = current_user.get_subscription()
|
||||||
# user who has canceled can re-subscribe
|
# user who has canceled can re-subscribe
|
||||||
if sub and not sub.cancelled:
|
if sub and not sub.cancelled:
|
||||||
|
|
Loading…
Reference in a new issue