diff --git a/bda/templates/bda-unpaid.html b/bda/templates/bda-unpaid.html index 5596dd82..df30cfd3 100644 --- a/bda/templates/bda-unpaid.html +++ b/bda/templates/bda-unpaid.html @@ -4,4 +4,5 @@

ImpayƩs

+

Total : {{ unpaid|length }}

{% endblock %} diff --git a/bda/views.py b/bda/views.py index fd0a0cdc..9b0323ce 100644 --- a/bda/views.py +++ b/bda/views.py @@ -330,7 +330,8 @@ class SpectacleListView(ListView): def unpaid(request, tirage_id): tirage = get_object_or_404(Tirage, id=tirage_id) unpaid = tirage.participant_set.filter(paid=False).all() - return render(request, "bda-unpaid.html", {"unpaid": unpaid}) + really_unpaid = [part for part in unpaid if part.attribution_set.all()] + return render(request, "bda-unpaid.html", {"unpaid": really_unpaid}) @buro_required def liste_spectacles_ics(request, tirage_id):