Fix is_supervisor returning true if user has any levels

Whoops!
This commit is contained in:
2022-01-02 11:15:03 +00:00
parent b73b8401b6
commit 046d0e461d
3 changed files with 3 additions and 3 deletions

View File

@@ -38,7 +38,7 @@
<td {% if object.is_driver %}class="table-success"{%endif%}>{{ object.is_driver|yesno|title }}</td>
<td>{% for level in object|get_levels_of_depth:1 %}{% if forloop.first %}Yes {%endif%}{{ level.get_icon }}{%empty%}No{%endfor%}</td>
<td {% if object.is_supervisor %}class="table-success"{%endif%}>{% for level in object|get_levels_of_depth:2 %}{% if forloop.first %}Yes {%endif%}{{ level.get_icon }}{%empty%}No{%endfor%}</td>
<td>{{ object.num_qualifications }}</td>
<td>{{ object.num_qualifications }} {% if forloop.first %} <span class="fas fa-crown text-warning"></span>{% endif %}</td>
<td style="white-space: nowrap">
<a class="btn btn-info" href="{% url 'trainee_detail' pk=object.pk %}"><span class="fas fa-eye"></span> View Training Record</a>
<a href="{% url 'trainee_item_detail' pk=object.pk %}" class="btn btn-info"><span class="fas fa-info-circle"></span> View Detailed Record</a>