From c5a702e6d156ca49687181b305574825ade896c2 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Wed, 5 Jul 2023 19:18:41 +0200 Subject: [PATCH] Fix: creation semestre-> renvoi sur annulation --- app/scodoc/sco_formsemestre_edit.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/app/scodoc/sco_formsemestre_edit.py b/app/scodoc/sco_formsemestre_edit.py index 317e4936c..9c8466ed2 100644 --- a/app/scodoc/sco_formsemestre_edit.py +++ b/app/scodoc/sco_formsemestre_edit.py @@ -793,13 +793,16 @@ def do_formsemestre_createwithmodules(edit=False, formsemestre: FormSemestre = N {tf[1]} """ elif tf[0] == -1: - return redirect( - url_for( - "notes.formsemestre_status", - scodoc_dept=g.scodoc_dept, - formsemestre_id=formsemestre.id if formsemestre else formsemestre_id, + if formsemestre: + return redirect( + url_for( + "notes.formsemestre_status", + scodoc_dept=g.scodoc_dept, + formsemestre_id=formsemestre.id, + ) ) - ) + else: + return redirect(url_for("notes.index_html", scodoc_dept=g.scodoc_dept)) else: if tf[2]["gestion_compensation_lst"]: tf[2]["gestion_compensation"] = True