From 6461d14883e52e8e488e9b6a195ca35b5e847057 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Mon, 15 Jan 2024 18:57:52 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20bug=20synchro=20apo=20si=201=20seul=20?= =?UTF-8?q?=C3=A9tudiant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/scodoc/sco_portal_apogee.py | 4 +++- app/scodoc/sco_synchro_etuds.py | 2 +- tools/fakeportal/fakeportal.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/scodoc/sco_portal_apogee.py b/app/scodoc/sco_portal_apogee.py index bfec3eb52..9a46edb26 100644 --- a/app/scodoc/sco_portal_apogee.py +++ b/app/scodoc/sco_portal_apogee.py @@ -149,7 +149,9 @@ get_maquette_url = _PI.get_maquette_url get_portal_api_version = _PI.get_portal_api_version -def get_inscrits_etape(code_etape, annee_apogee=None, ntrials=4, use_cache=True): +def get_inscrits_etape( + code_etape, annee_apogee=None, ntrials=4, use_cache=True +) -> list[dict]: """Liste des inscrits à une étape Apogée Result = list of dicts ntrials: try several time the same request, useful for some bad web services diff --git a/app/scodoc/sco_synchro_etuds.py b/app/scodoc/sco_synchro_etuds.py index 9982dfba1..dca27e64f 100644 --- a/app/scodoc/sco_synchro_etuds.py +++ b/app/scodoc/sco_synchro_etuds.py @@ -132,7 +132,7 @@ def formsemestre_synchro_etuds( if isinstance(etuds, str): etuds = etuds.split(",") # vient du form de confirmation elif isinstance(etuds, int): - etuds = [etuds] + etuds = [str(etuds)] if isinstance(inscrits_without_key, int): inscrits_without_key = [inscrits_without_key] elif isinstance(inscrits_without_key, str): diff --git a/tools/fakeportal/fakeportal.py b/tools/fakeportal/fakeportal.py index 7efff4d3d..785f5856a 100755 --- a/tools/fakeportal/fakeportal.py +++ b/tools/fakeportal/fakeportal.py @@ -4,7 +4,7 @@ emulating "Apogee" Web service Usage: - /opt/scodoc/tools/fakeportal/fakeportal.py + /opt/scodoc/tools/fakeportal/fakeportal.py et régler "URL du portail" sur la page de *Paramétrage* du département testé, typiquement: http://localhost:8678