From 623c6a32d044b33f0300eca0ebc663f0416110ce Mon Sep 17 00:00:00 2001 From: Robin Champenois Date: Wed, 17 May 2017 13:14:43 +0200 Subject: [PATCH] =?UTF-8?q?Hotfix=20:=20enregistrer=20et=20continuer=20?= =?UTF-8?q?=C3=A0=20modifier=20provoquait=20une=20d=C3=A9duplication=20des?= =?UTF-8?q?=20stages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- avisstage/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/avisstage/views.py b/avisstage/views.py index 4e0dfa5..2e3d5d1 100644 --- a/avisstage/views.py +++ b/avisstage/views.py @@ -125,7 +125,8 @@ def manage_stage(request, pk=None): avis_lieu_formset.save() print request.POST if "continuer" in request.POST: - pass + if pk is None: + return redirect(reverse('avisstage:stage_edit',kwargs={'pk':stage.id})) else: return redirect(reverse('avisstage:stage', kwargs={'pk':stage.id}))