Fix bug where slots appears when slot expired

This commit is contained in:
Antoine Bartuccio 2016-09-28 17:22:34 +02:00
parent fd482195f8
commit a008f34288

View File

@ -35,7 +35,7 @@
{%- endmacro %}
{% macro show_slots(user) %}
{% if get_subscriber(user).slots.exists() %}
{% if get_subscriber(user).slots.filter(start_date__gte=timezone.now()).exists() %}
<h5>{% trans %}Slot{% endtrans %}</h5>
<ul>
{% for i in get_subscriber(user).slots.filter(start_date__gte=timezone.now().replace(tzinfo=None)).all() %}