Skip to content

Commit c993f8a

Browse files
committed
Check if user has a profile
1 parent 2a2f334 commit c993f8a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

webapp/templates/distribution/members.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ <h1 class="page-header">Uitdeelleden</h1>
3434
{% if user.is_coordinator or 'Admin' in user.flat_groups or user.is_superuser %}
3535
<td class="col-md-3">{{ account.userprofile.coordinator_remarks|default_if_none:"" }}</td>
3636
<td class="col-md-1">
37+
{% if account.userprofile %}
3738
<a href="{% url 'coordinator_remarks' account.userprofile.id %}"><span class="bi-pencil-fill"></span></a>
39+
{% endif %}
3840
</td>
3941
{% endif %}
4042
<td class="col-md-1 text-center">{% if 'Uitdeelcoordinatoren' in account.flat_groups %}<span class="bi-check-lg"></span>{% endif %}</td>

webapp/templates/transport/members.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ <h1 class="page-header">Transportleden</h1>
3636
{% if 'Transportcoordinatoren' in user.flat_groups or 'Admin' in user.flat_groups or user.is_superuser %}
3737
<td class="col-md-3">{{ account.userprofile.coordinator_remarks|default_if_none:"" }}</td>
3838
<td class="col-md-1">
39-
<a href="{% url 'coordinator_remarks' account.userprofile.id %}"><span class="bi-pencil-fill"></span></a>
39+
{% if account.userprofile %}
40+
<a href="{% url 'coordinator_remarks' account.userprofile.id %}"><span class="bi-pencil-fill"></span></a>
41+
{% endif %}
4042
</td>
4143
{% endif %}
4244
<td class="col-md-1 text-center">{% if 'Transportcoordinatoren' in account.flat_groups %}<span class="bi-check-lg"></span>{% endif %}</td>

0 commit comments

Comments
 (0)