From 64831109925e7b0fb785d5e83eee8d0bda480c32 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 28 Aug 2023 12:03:55 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20cr=C3=A9ation=20=C3=A9valuation=20sans?= =?UTF-8?q?=20date=20via=20ancien=20formulaire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_evaluation_edit.py | 5 +++-- sco_version.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/scodoc/sco_evaluation_edit.py b/app/scodoc/sco_evaluation_edit.py index f1b21ca79..0bd8333b9 100644 --- a/app/scodoc/sco_evaluation_edit.py +++ b/app/scodoc/sco_evaluation_edit.py @@ -351,14 +351,15 @@ def evaluation_create_form( else: date_debut = None args.pop("jour", None) - if args.get("heure_debut"): + if date_debut and args.get("heure_debut"): try: heure_debut = heure_to_time(args["heure_debut"]) except ValueError as exc: raise ScoValueError("Heure début invalide") from exc args["date_debut"] = datetime.datetime.combine(date_debut, heure_debut) args.pop("heure_debut", None) - if args.get("heure_fin"): + # note: ce formulaire ne permet de créer que des évaluation avec debut et fin sur le même jour. + if date_debut and args.get("heure_fin"): try: heure_fin = heure_to_time(args["heure_fin"]) except ValueError as exc: diff --git a/sco_version.py b/sco_version.py index 88da5fd38..b5137adad 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.6.14" +SCOVERSION = "9.6.15" SCONAME = "ScoDoc"