Actualiser app/scodoc/sco_edt_cal.py

Simplification du code pour rechercher formsemestre_id
This commit is contained in:
pascal.bouron 2024-10-23 23:18:53 +02:00
parent eaa82f61a4
commit cb13ea2e31

View File

@ -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,10 +231,9 @@ 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_for("assiduites.signal_assiduites_group", **params)
if group