Prévient plus tôt qu'un tirage ne peut être lancé.
GestioCOF ne présente pas le formulaire pour la graine du tirage si l'attribut `enable_do_tirage` du tirage est à `False`.
This commit is contained in:
parent
443b732859
commit
a3180fa479
1 changed files with 3 additions and 2 deletions
|
@ -181,8 +181,6 @@ def inscription(request, tirage_id):
|
|||
|
||||
def do_tirage(request, tirage_id):
|
||||
tirage_elt = get_object_or_404(Tirage, id=tirage_id)
|
||||
if not tirage_elt.enable_do_tirage:
|
||||
return render(request, "tirage-failed.html", {'tirage': tirage_elt})
|
||||
form = TokenForm(request.POST)
|
||||
if not form.is_valid():
|
||||
return tirage(request)
|
||||
|
@ -251,6 +249,9 @@ def do_tirage(request, tirage_id):
|
|||
|
||||
@buro_required
|
||||
def tirage(request, tirage_id):
|
||||
tirage_elt = get_object_or_404(Tirage, id=tirage_id)
|
||||
if not tirage_elt.enable_do_tirage:
|
||||
return render(request, "tirage-failed.html", {'tirage': tirage_elt})
|
||||
if request.POST:
|
||||
form = TokenForm(request.POST)
|
||||
if form.is_valid():
|
||||
|
|
Loading…
Reference in a new issue