1
0
forked from ScoDoc/ScoDoc

Fix 2 minor bugs

This commit is contained in:
Emmanuel Viennet 2024-09-19 20:39:58 +02:00
parent 75e5948dfe
commit 242b233d85
3 changed files with 13 additions and 4 deletions

View File

@ -149,13 +149,15 @@ def table_debouche_etudids(etudids, keep_numeric=True):
if itemsuivis: if itemsuivis:
if keep_numeric: # pour excel: if keep_numeric: # pour excel:
row["debouche"] = "\n".join( row["debouche"] = "\n".join(
f"""{it.item_date.strftime(scu.DATE_FMT)}: {it.situation or ""}""" f"""{it.item_date.strftime(scu.DATE_FMT) if it.item_date else ""
} : {it.situation or ""}"""
for it in itemsuivis for it in itemsuivis
) )
else: else:
row["debouche"] = "<br>".join( row["debouche"] = "<br>".join(
[ [
f"""{it.item_date.strftime(scu.DATE_FMT)} : {it.situation or ""} f"""{it.item_date.strftime(scu.DATE_FMT) if it.item_date else ""
} : {it.situation or ""}
<i>{', '.join( tag.title for tag in it.tags)}</i> <i>{', '.join( tag.title for tag in it.tags)}</i>
""" """
for it in itemsuivis for it in itemsuivis

View File

@ -974,7 +974,14 @@ def calendrier_assi_etud():
mode_demi: bool = scu.to_bool(request.args.get("mode_demi", "t")) mode_demi: bool = scu.to_bool(request.args.get("mode_demi", "t"))
show_pres: bool = scu.to_bool(request.args.get("show_pres", "f")) show_pres: bool = scu.to_bool(request.args.get("show_pres", "f"))
show_reta: bool = scu.to_bool(request.args.get("show_reta", "f")) show_reta: bool = scu.to_bool(request.args.get("show_reta", "f"))
annee: int = int(request.args.get("annee", scu.annee_scolaire())) annee_str = request.args.get("annee", "")
if not annee_str:
annee = scu.annee_scolaire()
else:
try:
annee = int(annee_str)
except ValueError as exc:
raise ScoValueError("année invalide") from exc
# Récupération des années d'étude de l'étudiant # Récupération des années d'étude de l'étudiant
annees: list[int] = [] annees: list[int] = []

View File

@ -1,7 +1,7 @@
# -*- mode: python -*- # -*- mode: python -*-
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
SCOVERSION = "9.7.23" SCOVERSION = "9.7.24"
SCONAME = "ScoDoc" SCONAME = "ScoDoc"