Robustifie old XMLgetGroupsInPartition

This commit is contained in:
Emmanuel Viennet 2023-07-17 14:04:42 +02:00
parent 8614a29f9b
commit 30666fc822

View File

@ -560,10 +560,10 @@ 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=str(group["group_id"]),
group_name=group["group_name"],
group_name=group["group_name"] or "",
)
x_response.append(x_group)
for e in get_group_members(group["group_id"]):
@ -572,10 +572,10 @@ def XMLgetGroupsInPartition(partition_id): # was XMLgetGroupesTD
Element(
"etud",
etudid=str(e["etudid"]),
civilite=etud["civilite_str"],
sexe=etud["civilite_str"], # compat
nom=sco_etud.format_nom(etud["nom"]),
prenom=sco_etud.format_prenom(etud["prenom"]),
civilite=etud["civilite_str"] or "",
sexe=etud["civilite_str"] or "", # compat
nom=sco_etud.format_nom(etud["nom"] or ""),
prenom=sco_etud.format_prenom(etud["prenom"] or ""),
origin=_comp_etud_origin(etud, formsemestre),
)
)