Merge branch 'Kerl/fix_44_tirage' into 'master'

Supprime les bonnes attributions lors d'un tirage.

Ne supprime plus toutes les attributions en lançant un tirage mais
seulement les attributions du tirage que l'on lance.

Fixes #44

See merge request !39
This commit is contained in:
Basile Clement 2016-06-21 22:38:48 +02:00
commit 1092b5f266

View file

@ -237,7 +237,9 @@ def do_tirage(request, tirage_id):
# FIXME: Établir les conditions de validations (formulaire ?) # FIXME: Établir les conditions de validations (formulaire ?)
# cf. issue #32 # cf. issue #32
if False: if False:
Attribution.objects.all().delete() Attribution.objects.filter(
spectacle__tirage=tirage_elt
).delete()
for (show, members, _) in results: for (show, members, _) in results:
for (member, _, _, _) in members: for (member, _, _, _) in members:
attrib = Attribution(spectacle=show, participant=member) attrib = Attribution(spectacle=show, participant=member)