Удаление данных в шаблоне Django Template Forloop

У меня есть цикл for в проекте Django следующего вида:

  {% for i in active_session.log.values %}
  {% if i.log_order == b.order and i.log_exercise == e.name %}
  <button type="submit" id="submitlog" class="......">
    <i class="fa-solid fa-check"></i>
  </button>
  {% else %}
  <button type="submit" id="submitlog" class="......">
    <i class="fa-solid fa-x"></i>
  </button>
  {% endif %}
  {% endfor  %}

Это текущий результат:

enter image description here

Мой вопрос: Как я могу избавиться от X в и оставить только кнопки проверки

Я пробовал следующее, но ничего не вышло:

{% if active_session.log.log_order == b.order and active_session.log.log_exercise == e.name %}

это требуемый результат: enter image description here

Вернуться на верх