From 98127e7c1da704d01d9a1bb942d6c202edeebd5b Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 18 Jul 2024 16:54:48 +0200 Subject: [PATCH] Misc fix for unit tests --- app/api/departements.py | 2 +- app/api/formations.py | 4 +++- app/scodoc/sco_edit_ue.py | 2 +- app/scodoc/sco_formation_recap.py | 2 +- app/templates/pn/form_mods.j2 | 2 +- sco_version.py | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/api/departements.py b/app/api/departements.py index 53ec4474..ea479b34 100644 --- a/app/api/departements.py +++ b/app/api/departements.py @@ -16,7 +16,7 @@ from flask import request from flask_json import as_json from flask_login import login_required -from app import db +from app import db, log from app.api import api_bp as bp, API_CLIENT_ERROR from app.api import api_permission_required as permission_required from app.decorators import scodoc diff --git a/app/api/formations.py b/app/api/formations.py index abab29e3..93f17248 100644 --- a/app/api/formations.py +++ b/app/api/formations.py @@ -520,7 +520,9 @@ def formation_module_set_code_apogee( code_apogee = code_apogee.strip("-_ \t")[:APO_CODE_STR_LEN] # tronque - log(f"API module_set_code_apogee: module_id={module.id} code_apogee={code_apogee}") + log( + f"API formation_module_set_code_apogee: module_id={module.id} code_apogee={code_apogee}" + ) module.code_apogee = code_apogee db.session.add(module) diff --git a/app/scodoc/sco_edit_ue.py b/app/scodoc/sco_edit_ue.py index 042297ed..4acc3043 100644 --- a/app/scodoc/sco_edit_ue.py +++ b/app/scodoc/sco_edit_ue.py @@ -1370,7 +1370,7 @@ def _ue_table_modules( "%(heures_cours)s/%(heures_td)s/%(heures_tp)s, coef. %(coefficient)s" % mod ) edit_url = url_for( - "apiweb.module_set_code_apogee", + "apiweb.formation_module_set_code_apogee", scodoc_dept=g.scodoc_dept, module_id=mod["module_id"], ) diff --git a/app/scodoc/sco_formation_recap.py b/app/scodoc/sco_formation_recap.py index 331e641c..0cc10c30 100644 --- a/app/scodoc/sco_formation_recap.py +++ b/app/scodoc/sco_formation_recap.py @@ -163,7 +163,7 @@ def formation_table_recap(formation: Formation, fmt="html") -> Response: url_for('apiweb.ue_set_code_apogee', scodoc_dept=g.scodoc_dept) }" data-apo_mod_save_url="{ - url_for('apiweb.module_set_code_apogee', scodoc_dept=g.scodoc_dept) + url_for('apiweb.formation_module_set_code_apogee', scodoc_dept=g.scodoc_dept) }" """, html_with_td_classes=True, diff --git a/app/templates/pn/form_mods.j2 b/app/templates/pn/form_mods.j2 index 274b25b5..964a9be8 100644 --- a/app/templates/pn/form_mods.j2 +++ b/app/templates/pn/form_mods.j2 @@ -56,7 +56,7 @@ ({{mod.heures_cours|default(" ",true)|safe}}/{{mod.heures_td|default(" ",true)|safe}}/{{mod.heures_tp|default(" ",true)|safe}}, {% else %} ({% endif %}Apo: {{mod.code_apogee|default("", true)}}) diff --git a/sco_version.py b/sco_version.py index 9e616fdf..53404442 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.7.2" +SCOVERSION = "9.7.4" SCONAME = "ScoDoc"