From 190304043db484222443bef1506a7d9402eab40c Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 7 Oct 2021 22:23:49 +0200 Subject: [PATCH] Fix: codes sems sur page accueil --- app/scodoc/sco_dept.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/scodoc/sco_dept.py b/app/scodoc/sco_dept.py index f948ec31d..a89f2184b 100644 --- a/app/scodoc/sco_dept.py +++ b/app/scodoc/sco_dept.py @@ -48,6 +48,7 @@ from app.scodoc import sco_users def index_html(showcodes=0, showsemtable=0): "Page accueil département (liste des semestres)" + showcodes = int(showcodes) showsemtable = int(showsemtable) H = [] @@ -78,7 +79,7 @@ def index_html(showcodes=0, showsemtable=0): # Responsable de formation: sco_formsemestre.sem_set_responsable_name(sem) - if showcodes == "1": + if showcodes: sem["tmpcode"] = "%s" % sem["formsemestre_id"] else: sem["tmpcode"] = "" @@ -126,7 +127,7 @@ def index_html(showcodes=0, showsemtable=0): """ % sco_preferences.get_preference("DeptName") ) - H.append(_sem_table_gt(sems).html()) + H.append(_sem_table_gt(sems, showcodes=showcodes).html()) H.append("") if not showsemtable: H.append(