Skip to content

Commit bd7c7f7

Browse files
committed
team captain template improvement
1 parent 4c3619f commit bd7c7f7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

project-templates/teams/team_detail.html

+7-3
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,13 @@ <h2>No image yet</h2>
4646
</tr>
4747
<tr>
4848
<td class="">Captains</td>
49-
{% for captain in captains %}
50-
<td><a href="{% url 'profiles:profile' urlusername=captain.user %}">{{ captain.name }}</a></td>
51-
{% endfor %}
49+
{% if team.captain.count == 0 %}
50+
<td>There are no captains on this team!</td>
51+
{% else %}
52+
{% for captain in team.captain.all %}
53+
<td><a href="{% url 'profiles:profile' urlusername=captain.user %}">{{ captain }}</a></td>
54+
{% endfor %}
55+
{% endif %}
5256
</tr>
5357
<tr>
5458
<td>Created</td>

0 commit comments

Comments
 (0)