From 9f422446125ecfe94e056d7ba62a40850e86821a Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 27 Jun 2022 09:32:26 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20cr=C3=A9ation=20auto=20de=20bonus=20si?= =?UTF-8?q?=20mati=C3=A8res=20sans=20num=C3=A9ros?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_edit_module.py | 2 +- sco_version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/scodoc/sco_edit_module.py b/app/scodoc/sco_edit_module.py index 0b76fce3..0e1a75d6 100644 --- a/app/scodoc/sco_edit_module.py +++ b/app/scodoc/sco_edit_module.py @@ -978,7 +978,7 @@ def ue_add_malus_module(ue: UniteEns, titre=None, code=None) -> int: matiere = matieres_malus[0] else: if ue.matieres.count() > 0: - numero = max([mat.numero for mat in ue.matieres]) + 10 + numero = max([(mat.numero or 0) for mat in ue.matieres]) + 10 else: numero = 0 matiere = Matiere(ue_id=ue.id, titre=titre_matiere_malus, numero=numero) diff --git a/sco_version.py b/sco_version.py index afc06727..e84b08da 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.3.3" +SCOVERSION = "9.3.4" SCONAME = "ScoDoc"