Empêche le tirage

This commit is contained in:
Martin Pépin 2016-06-06 13:20:14 +02:00
parent 759893f728
commit e29184e7d5

View file

@ -229,11 +229,12 @@ def do_tirage(request, tirage_id):
members2 = members2.items() members2 = members2.items()
data["members2"] = sorted(members2, key=lambda m: m[0].user.last_name) data["members2"] = sorted(members2, key=lambda m: m[0].user.last_name)
# À partir d'ici, le tirage devient effectif # À partir d'ici, le tirage devient effectif
Attribution.objects.all().delete() if False:
for (show, members, _) in results: Attribution.objects.all().delete()
for (member, _, _, _) in members: for (show, members, _) in results:
attrib = Attribution(spectacle=show, participant=member) for (member, _, _, _) in members:
attrib.save() attrib = Attribution(spectacle=show, participant=member)
attrib.save()
return render(request, "bda-attrib-extra.html", data) return render(request, "bda-attrib-extra.html", data)
else: else:
return render(request, "bda-attrib.html", data) return render(request, "bda-attrib.html", data)