Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
Showing only changes of commit 2915f4e981 - Show all commits

View File

@ -3106,7 +3106,10 @@ def formsemestre_set_elt_sem_apo():
"""Change les codes étapes du semestre indiqué. """Change les codes étapes du semestre indiqué.
Args: oid=formsemestre_id, value=chaine "V3ONM, V3ONM1, V3ONM2", codes séparés par des virgules Args: oid=formsemestre_id, value=chaine "V3ONM, V3ONM1, V3ONM2", codes séparés par des virgules
""" """
oid = int(request.form.get("oid")) try:
oid = int(request.form.get("oid"))
except (TypeError, ValueError) as exc:
raise ScoValueError("paramètre invalide") from exc
value = (request.form.get("value") or "").strip() value = (request.form.get("value") or "").strip()
formsemestre: FormSemestre = FormSemestre.query.get_or_404(oid) formsemestre: FormSemestre = FormSemestre.query.get_or_404(oid)
if value != formsemestre.elt_sem_apo: if value != formsemestre.elt_sem_apo: