From bbfce33c3f9cb75cf69d4970cfd6524ac9b55950 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Sun, 25 Sep 2016 14:39:18 +0200 Subject: [PATCH] corrects bug with bda-buy --- bda/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bda/views.py b/bda/views.py index 241bc90d..bac7415d 100644 --- a/bda/views.py +++ b/bda/views.py @@ -440,7 +440,7 @@ def buy_revente(request, spectacle_id): return render(request, "bda-no-revente.html", {}) if request.POST: - revente = random.choice(reventes.all(), 1) + revente = random.choice(reventes.all()) revente.soldTo = participant revente.save() mail = """Bonjour ! @@ -456,7 +456,7 @@ Contacte-moi si tu es toujours intéressé·e ! [revente.seller.user.email], fail_silently=False) return render(request, "bda-success.html", - {"seller": revente.participant.user, + {"seller": revente.attribution.participant.user, "spectacle": spectacle}) return render(request, "revente-confirm.html",