From 199895630e4e6d2174e302f0bf02fc6bd9a0cfa2 Mon Sep 17 00:00:00 2001 From: ludo Date: Fri, 17 Jun 2016 16:31:08 +0200 Subject: [PATCH] Gestion de plus de deux places --- bda/views.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bda/views.py b/bda/views.py index 26ca7cb7..826b2e7f 100644 --- a/bda/views.py +++ b/bda/views.py @@ -334,8 +334,11 @@ def add_attrib(request, tirage_id, spectacle_id): attrib = Attribution(participant=part, spectacle=spectacle, given=('given' in request.POST)) attrib.save() - if request.POST['nb_places']==2: - attrib.save() + if int(request.POST['nb_places'])==2: + attrib2 = Attribution(participant=part, spectacle=spectacle, + given=('given' in request.POST)) + attrib2.save() + messages.add_message(request, messages.SUCCESS, "Attribution réussie !") return HttpResponseRedirect(reverse('bda-spectacle',