Commit 0458b149 authored by Birin Sanchez's avatar Birin Sanchez

Fix corner case for users without ChosenReward in profile page.

Signed-off-by: Birin Sanchez's avatarBirin Sanchez <birin.sanchez@puri.sm>
parent 15bb2885
Pipeline #7623 passed with stage
in 40 seconds
......@@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0
<a href="{% url 'home' %}"><img class="logo" src="{% static 'logo.png' %}" alt="{{ site_title }}"/></a>
<div id="title_text">
<h1>{% trans "User profile" %}</h1>
{% if request.user.chosenreward.is_pending %}
{% if haschosenreward and request.user.chosenreward.is_pending %}
<div class="notice">
<p>
Your registration is pending.
......@@ -67,7 +67,7 @@ SPDX-License-Identifier: AGPL-3.0
<hr/>
{% if not request.user.chosenreward.is_pending %}
{% if (haschosenreward and not request.user.chosenreward.is_pending) or not haschosenreward %}
<main class="col-wrapper form">
<article class="col-1">
......
......@@ -65,6 +65,7 @@ def userlimit(request):
"link_profile_ordered_dict": settings.LINK_PROFILE_ORDERED_DICT,
"action_function": action_function,
"invitations": invitations,
"haschosenreward": hasattr(request.user, 'chosenreward'),
"complete_signup_url": CartRegistrationView().get_success_url(request.user),
}
......
Markdown is supported
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