Commit 8cd1e17a authored by Birin Sanchez's avatar Birin Sanchez
Browse files

Don't show "Complete Billing" in pending page if customer has an

ExternalCredit, which means he/she has a subscription.

Signed-off-by: Birin Sanchez's avatarBirin Sanchez <>
parent e11a0807
Pipeline #10049 passed with stage
in 40 seconds
......@@ -31,11 +31,13 @@ SPDX-License-Identifier: AGPL-3.0
Your registration is pending. If you completed the billing process, please wait two minutes before refreshing this page.
{% if not haspaid %}
<p>If you have <strong><i>not</i></strong> completed the billing process, <a href="{{complete_signup_url}}">please do so now.</a>
Pending registrations are removed after 24 hours.
{% endif %}
{% else %}
<p>{% trans "Service credit and profile management" %}</p>
......@@ -4,7 +4,7 @@ from django.http import FileResponse, HttpResponseRedirect
from django.shortcuts import render
from django.urls import reverse
from .models import Limit
from .models import Limit, ExternalCredit
from invitation.models import Invitation
from purist.models import AccountType
from cart.views import CartRegistrationView
......@@ -52,7 +52,9 @@ def userlimit(request):
if not inv.expired() and not inv.consumed:
invitations['links_not_used'] = True
ec = ExternalCredit.objects.filter(
haspaid = len(ec) > 0
render_data = {
"username": username,
......@@ -67,6 +69,7 @@ def userlimit(request):
"invitations": invitations,
"haschosenreward": hasattr(request.user, 'chosenreward'),
"complete_signup_url": CartRegistrationView().get_success_url(request.user),
"haspaid": haspaid,
return render(request, 'limitmonitor/userlimit.html', render_data)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment