From 30666fc822e76b59910dea3e8851c0325b7f6b61 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 17 Jul 2023 14:04:42 +0200 Subject: [PATCH] Robustifie old XMLgetGroupsInPartition --- app/scodoc/sco_groups.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/scodoc/sco_groups.py b/app/scodoc/sco_groups.py index d32a12dbb..c5f68fe06 100644 --- a/app/scodoc/sco_groups.py +++ b/app/scodoc/sco_groups.py @@ -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), ) )