From 5a011bc0fddb34180558552cc91900c749a58f04 Mon Sep 17 00:00:00 2001 From: chirac Date: Mon, 4 Jul 2016 03:29:38 +0200 Subject: [PATCH] =?UTF-8?q?Si=20une=20facture=20est=20d=C3=A9valid=C3=A9e?= =?UTF-8?q?=20par=20le=20tr=C3=A9sorier,=20la=20connexion=20est=20imm?= =?UTF-8?q?=C3=A9diatement=20coup=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cotisations/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cotisations/views.py b/cotisations/views.py index 4aa8aa17..571be4a8 100644 --- a/cotisations/views.py +++ b/cotisations/views.py @@ -21,7 +21,7 @@ def form(ctx, template, request): def end_adhesion(user): """ Renvoie la date de fin d'adhésion d'un user, False sinon """ - date_max = Cotisation.objects.all().filter(facture=Facture.objects.all().filter(user=user)).aggregate(Max('date_end'))['date_end__max'] + date_max = Cotisation.objects.all().filter(facture=Facture.objects.all().filter(user=user).exclude(valid=False)).aggregate(Max('date_end'))['date_end__max'] return date_max def is_adherent(user):