Fix bug with show-profile.

This commit is contained in:
Bheesham Persaud 2018-02-25 12:11:26 -05:00
parent 88c809a50d
commit 5f4d85f709
2 changed files with 2 additions and 2 deletions

View file

@ -17,7 +17,7 @@ Homepage: {{user.weburl}} <br>
<ul> <ul>
{% for t in teams %} {% for t in teams %}
<li> <li>
<a href="{% url 'show-team' t.id %}" title="Team page for {{t.team.name}}">{{t.team.name}}</a> <a href="{% url 'show-team' t.id %}" title="Team page for {{t.name}}">{{t.name}}</a>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>

View file

@ -38,7 +38,7 @@ def show_profile(request, user_id):
except ObjectDoesNotExist: except ObjectDoesNotExist:
return render(request, template, {'user': None}, status=404) return render(request, template, {'user': None}, status=404)
teams = Member.objects.filter(user_id=user_id) teams = user.memberships.all()
context = { context = {
'user': user, 'user': user,