From cb13ea2e311ea3e4897d9878d653c53ba9eb759d Mon Sep 17 00:00:00 2001 From: "pascal.bouron" Date: Wed, 23 Oct 2024 23:18:53 +0200 Subject: [PATCH] Actualiser app/scodoc/sco_edt_cal.py Simplification du code pour rechercher formsemestre_id --- app/scodoc/sco_edt_cal.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/scodoc/sco_edt_cal.py b/app/scodoc/sco_edt_cal.py index e81ac838e..be0112042 100644 --- a/app/scodoc/sco_edt_cal.py +++ b/app/scodoc/sco_edt_cal.py @@ -42,7 +42,6 @@ from flask import g, url_for from app import log from app.auth.models import User from app.models import FormSemestre, GroupDescr, ModuleImpl, ScoDocSiteConfig -from app.scodoc.html_sidebar import retreive_formsemestre_from_request from app.scodoc.sco_exceptions import ScoValueError import app.scodoc.sco_utils as scu @@ -232,11 +231,10 @@ def translate_calendar( } if modimpl: params["moduleimpl_id"] = modimpl.id - else: - params["formsemestre_id"] = retreive_formsemestre_from_request() + elif group: + params["formsemestre_id"] = group.partition.formsemestre_id - # Génération de l'URL si group et l'un des deux (modimpl ou formsem) sont définis - url_abs = ( + url_abs = ( url_for("assiduites.signal_assiduites_group", **params) if group else None