From d5c5134d4709b33b79c74bd73b4734f04b7256d3 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Wed, 30 Nov 2016 00:59:04 +0100 Subject: [PATCH] Fix models import --- cotisations/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cotisations/views.py b/cotisations/views.py index abd6e893..ba3533d6 100644 --- a/cotisations/views.py +++ b/cotisations/views.py @@ -33,7 +33,7 @@ def create_cotis(vente, user, duration, date_start=False): """ Update et crée l'objet cotisation associé à une facture, prend en argument l'user, la facture pour la quantitéi, et l'article pour la durée""" cotisation=Cotisation(vente=vente) if date_start: - end_adhesion = Cotisation.objects.filter(vente=Vente.objects.filter(facture=Facture.objects.filter(user=user).exclude(valid=False))).filter(date_start__lt=date_start).aggregate(models.Max('date_end'))['date_end__max'] + end_adhesion = Cotisation.objects.filter(vente=Vente.objects.filter(facture=Facture.objects.filter(user=user).exclude(valid=False))).filter(date_start__lt=date_start).aggregate(Max('date_end'))['date_end__max'] else: end_adhesion = user.end_adhesion() date_start = date_start or timezone.now()