Fix: robustifie export xml de groupes sans noms

This commit is contained in:
Emmanuel Viennet 2023-07-13 12:55:19 +02:00
parent 417b3b8383
commit 2c93c35aa7
3 changed files with 7 additions and 6 deletions

View File

@ -28,13 +28,14 @@
"""Table recap formation (avec champs éditables)
"""
import io
from zipfile import ZipFile, BadZipfile
from zipfile import ZipFile
from flask import Response
from flask import send_file, url_for
from flask import g, request
from flask_login import current_user
from app import db
from app.models import Formation, FormSemestre, Matiere, Module, UniteEns
from app.scodoc.gen_tables import GenTable

View File

@ -587,7 +587,7 @@ def XMLgetGroupsInPartition(partition_id): # was XMLgetGroupesTD
x_group = Element(
"group",
partition_id=str(partition_id),
partition_name=partition["partition_name"],
partition_name=partition["partition_name"] or "",
groups_editable=str(int(partition["groups_editable"])),
group_id="_none_",
group_name="",
@ -599,9 +599,9 @@ def XMLgetGroupsInPartition(partition_id): # was XMLgetGroupesTD
Element(
"etud",
etudid=str(etud["etudid"]),
sexe=etud["civilite_str"],
nom=sco_etud.format_nom(etud["nom"]),
prenom=sco_etud.format_prenom(etud["prenom"]),
sexe=etud["civilite_str"] or "",
nom=sco_etud.format_nom(etud["nom"] or ""),
prenom=sco_etud.format_prenom(etud["prenom"] or ""),
origin=_comp_etud_origin(etud, formsemestre),
)
)

View File

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