Utilise bulk_create
dans le tirage
This commit is contained in:
parent
71b810695f
commit
92f672d573
1 changed files with 4 additions and 4 deletions
|
@ -251,10 +251,10 @@ def do_tirage(request, tirage_id):
|
|||
form.cleaned_data['token'])
|
||||
tirage_elt.enable_do_tirage = False
|
||||
tirage_elt.save()
|
||||
for (show, members, _) in results:
|
||||
for (member, _, _, _) in members:
|
||||
attrib = Attribution(spectacle=show, participant=member)
|
||||
attrib.save()
|
||||
Attribution.objects.bulk_create([
|
||||
Attribution(spectacle=show, participant=member)
|
||||
for show, members, _ in results
|
||||
for member, _, _, _ in members])
|
||||
return render(request, "bda-attrib-extra.html", data)
|
||||
else:
|
||||
return render(request, "bda-attrib.html", data)
|
||||
|
|
Loading…
Reference in a new issue